|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
How can I do this in JAVA what i need is the following: Create an applet that has a JTextField for the user to enter the name of a color. If the color entered is not either red, white, blue, then your applet should throw an Exception and tell the user the color entered was not valid. Otherwise change the background color to the appropriate color. |
#2
| |||
| |||
Re: How can I do this in JAVA Hello Daren, Looks like you have a problem with your java related issues everyday or most often, I will suggest you using following site http://forums.sun.com/ to get immediate help. Someone will surely help you fix your problem here.
__________________ News |
#3
| |||
| |||
Re: How can I do this in JAVA You may use the following jtextfield programming logic to apply in your project. Code: JTextArea textArea = new JTextArea(); textArea.setOpaque(true); textArea.setBackground(Color.Blue); textArea.setForeground(Color.BLACK); textArea.setText(answer); textArea.setBorder(CommonUI.createEtchedBorder()); textArea.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0)); Code: someField.setBackground(new JTextField().getBackground()); |
![]() |
|
Tags: java |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Java Auto Updater wants me to update java everyday in Windows 7 | minajoh | Windows Software | 4 | 04-09-2013 11:04 PM |
Setting Of Java to The Point At Manual Java | winni | Software Development | 4 | 10-01-2011 10:05 PM |
Java Programming using Adventnet SNMP Java API | ROCKING_Suhas | Software Development | 5 | 17-07-2010 06:52 AM |
Link List Example in Java Sample program in Java | trickson | Software Development | 2 | 04-08-2009 08:23 PM |