Results 1 to 5 of 5
Thread: applet and textfields
- 01-28-2011, 02:52 PM #1
Member
- Join Date
- Dec 2010
- Location
- Dallas
- Posts
- 10
- Rep Power
- 0
applet and textfields
I have an applet where I display rows of data using JtextField,
I have disable the fields so the users can't change the data. which turn the field gray - uneditable.
Is there a way to disable a field and allow me to change the text to the color Red.
I tried setcolor(red) on the disabled field - but they are still gray on white:eek:Last edited by poajavaweb; 01-28-2011 at 03:11 PM.
- 01-28-2011, 03:21 PM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
Read the API for JTextField, in particular the setForeground method which accepts a Color as a parameter.
- 01-28-2011, 04:34 PM #3
Member
- Join Date
- Dec 2010
- Location
- Dallas
- Posts
- 10
- Rep Power
- 0
Have already tried setForeground setBackground setColor. still gray on white
- 01-28-2011, 05:51 PM #4
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
- 01-28-2011, 08:56 PM #5
Member
- Join Date
- Dec 2010
- Location
- Dallas
- Posts
- 10
- Rep Power
- 0
Similar Threads
-
adding textfields
By themanepalli in forum Java AppletsReplies: 1Last Post: 12-28-2010, 03:56 AM -
How to validate textfields if data is modifier
By sasi.tati in forum AWT / SwingReplies: 1Last Post: 07-26-2010, 09:10 AM -
Buttons and TextFields
By Xystus777 in forum New To JavaReplies: 27Last Post: 03-17-2009, 01:26 AM -
How can I place Buttons and TExtfields within an Applet window?
By sergioTOOL in forum JCreatorReplies: 0Last Post: 02-11-2009, 11:12 PM -
information from a textfields
By bbq in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 06-28-2007, 05:28 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks