Thanks,
I use JFrame and NetBeans and I change color from the design mode (Properties windows on the right side)
User Profile
Collapse
-
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. -
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 -
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;
} -
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....Leave a comment:
-
Exiting a program
Hello all experts,
How to exit a program without using ||,
or without using break;
or without using System.exit();
Please help. -
AND and OR in Java
Hi all brothers,
Please give me some idea how to use AND and OR in java.
Thanks -
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...Leave a comment:
-
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:
...Leave a comment:
-
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.Leave a comment:
-
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...Leave a comment:
-
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...
No activity results to display
Show More
Leave a comment: