User Profile

Collapse

Profile Sidebar

Collapse
hhhhhhhh
hhhhhhhh
Last Activity: Nov 29 '07, 12:11 AM
Joined: Oct 3 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • hhhhhhhh
    replied to GUI design
    in Java
    Thanks,

    I use JFrame and NetBeans and I change color from the design mode (Properties windows on the right side)
    See more | Go to post

    Leave a comment:


  • hhhhhhhh
    started a topic GUI design
    in Java

    GUI design

    Hi all friends,
    I am designing simple GUI application. How do I change the background color?
    I did change the background color in the design mode. When I run the app, I did not see the color I chose. Please help.
    See more | Go to post

  • hhhhhhhh
    started a topic How to validate letters and numbers
    in Java

    How to validate letters and numbers

    Hello all,

    When I run the application, it requires to enter Employee number, social, and name. I can enter any letter and number to call employee number, social and name. I do not know how to validate letters and number.

    For example, for the employee number, I have to enter number only;
    for employee name, I have to enter letter only,

    Please give some idea.
    Thanks
    See more | Go to post

  • hhhhhhhh
    started a topic class variable or instance variable
    in Java

    class variable or instance variable

    What is a class variable or instance variable? I am still confused. Suppose I have the code like this:

    public class SavingAccount
    {
    private double annualInterestR ate = 0;

    private double savingsBalance;
    }
    See more | Go to post

  • hhhhhhhh
    replied to Exiting a program
    in Java
    Thanks for replying. This is regard to the ATM program. Suppose you have $1000 in your account. If you withdraw $900, the program will exit leaving you $100 balance. I am OK with this part.
    If you enter $1200, you will be asked to re-enter the correct amount. Otherwise, you will be asked to enter 0 or -1 to exit. How do you code this line? This is what I could not get....
    See more | Go to post

    Leave a comment:


  • hhhhhhhh
    started a topic Exiting a program
    in Java

    Exiting a program

    Hello all experts,

    How to exit a program without using ||,
    or without using break;
    or without using System.exit();

    Please help.
    See more | Go to post

  • hhhhhhhh
    started a topic AND and OR in Java
    in Java

    AND and OR in Java

    Hi all brothers,

    Please give me some idea how to use AND and OR in java.

    Thanks
    See more | Go to post

  • hhhhhhhh
    replied to Stuck with Switch
    in Java
    Thanks for your idea. I tried but still did not work as I expected.
    Here is the code

    System.out.prin tln("\nEnter product number (1-3):");
    productID = input.nextInt() ; //read the product ID

    // determine the number sold of the item
    System.out.prin tln( "Enter quantity ordered:" );
    int quantity = input.nextInt() ;


    And...
    See more | Go to post

    Leave a comment:


  • hhhhhhhh
    replied to Stuck with Switch
    in Java
    I made it work. I changed line #26, 30, and 34.
    However, I can enter only one product at a time. For example, the message asks: Enter product number (1-3), I can enter only 1 or 2 or 3.

    How do I set up to NOT enter 4 or to enter 1 and 2 and 3 a tthe same time?


    When I run the file, I got a message Enter product number (1-3). I entered 1 in the input box. However, the output looks like this:
    ...
    See more | Go to post

    Leave a comment:


  • hhhhhhhh
    replied to Stuck with Switch
    in Java
    I do not know how to set a formula.

    I want to buy, for example 2* Product1 + 5*Product2 + 3*Product3 and the print will show the total amount of all products.
    See more | Go to post

    Leave a comment:


  • hhhhhhhh
    replied to Stuck with Switch
    in Java
    Thanks for quick reply.

    I do not know how to set up the formula. When I run the file, it looks like this:

    init:
    deps-jar:
    compile-single:
    run-single:
    Enter product number (1-3):



    When I enter information, it becomes this:


    init:
    deps-jar:
    compile-single:
    run-single:
    Enter product number (1-3):
    1
    Enter
    ...
    See more | Go to post

    Leave a comment:


  • hhhhhhhh
    started a topic Stuck with Switch
    in Java

    Stuck with Switch

    I am a new member.
    I got stuck using Switch in java. Could someone help me?

    This is my code:
    Thanks




    [CODE=java]import java.util.Scann er;

    public class MailOrder {

    public static void main(String[] args) {

    Scanner input = new Scanner( System.in );//declare Scanner object

    int productID=0;//productID...
    See more | Go to post
    Last edited by Ganon11; Oct 4 '07, 01:11 AM. Reason: Please use the [CODE] tags provided.
No activity results to display
Show More
Working...