Results 1 to 3 of 3
- 06-26-2012, 06:21 PM #1
Member
- Join Date
- May 2012
- Posts
- 3
- Rep Power
- 0
JTextArea is hiding drop downs....
I have a JTextArea, a couple of JComboBoxes, and a JDateChooser in a FormLayout on one of my application tabs. Whenever I choose a date on the JDateChooser the dropdowns from the JComboBoxes or Date Chooser are hidden behind the JTextArea until I switch tabs. Has anyone else experienced this problem, and if so how do I go about fixing it?
The relevant code is below containing the JDateChooser, a couple other fields, and the comments JTextArea:
My jdk version is:Java Code:// date section JLabel lblDate = new JLabel("Date"); lblDate.setFont(new Font("Times New Roman", Font.BOLD, 14)); p.add(lblDate, "2, 12, right, default"); Box dateBox = Box.createHorizontalBox(); p.add(dateBox, "4, 12"); JDateChooser jc = new JDateChooser(); jc.setDateFormatString("MM-dd-yyyy"); jc.setDate(new Date()); dateBox.add(jc); TabOneDateListener todl = new TabOneDateListener(); jc.addPropertyChangeListener(todl); // hours section JLabel lblHoursUsed = new JLabel("Hours Used"); lblHoursUsed.setFont(new Font("Times New Roman", Font.BOLD, 14)); p.add(lblHoursUsed, "2, 14, right, default"); spinner = new JSpinner(); spinner.setFont(new Font("Tahoma", Font.BOLD, 16)); p.add(spinner, "4, 14, 1, 2, fill, fill"); HoursListener hl = new HoursListener(); spinner.addChangeListener(hl); // engineer section String uname = System.getProperty("user.name"); UpdateEngineeringHours.getInstance().setEngineer(uname); JLabel lblEngineer = new JLabel("Engineer"); lblEngineer.setFont(new Font("Times New Roman", Font.BOLD, 14)); p.add(lblEngineer, "2, 18, right, default"); txtEngineer = new JTextField(); txtEngineer.setBackground(Color.LIGHT_GRAY); txtEngineer.setEditable(false); jpTab0.add(txtEngineer, "4, 18, fill, default"); txtEngineer.setColumns(10); txtEngineer.setText(uname); // comments section JLabel lblComments = new JLabel("Comments"); lblComments.setFont(new Font("Times New Roman", Font.BOLD, 14)); p.add(lblComments, "2, 20, right, top"); txtComments = new TextArea(4,4); p.add(txtComments, "4, 20, fill, top");
jdk1.7.0_02
My Operating System is:
Windows XP Professional Service Pack 3
My IDE is:
Eclipse Indigo Service Release 1
Build id: 20110916-0149
My JCalander Version is:
v1.4 - 07/09/2011
Any help will be greatly appreciated!
Thanks,
Robert
- 06-27-2012, 05:11 PM #2
Member
- Join Date
- May 2012
- Posts
- 3
- Rep Power
- 0
Re: JTextArea is hiding drop downs....
I actually found my own work-around just so everyone knows. instead of using a JTextArea I replaced it with a JEditorPane and encapsulated it with a JScrollPane. This is not a fix for the issue with JTextArea but it works around the problem. The JEditor Pane does not hide any of the drop-downs.
cheers,
Robert
- 06-28-2012, 08:40 PM #3
Similar Threads
-
JTextArea on PopUp -JTextArea isn't editable
By Richy76 in forum AWT / SwingReplies: 3Last Post: 02-01-2010, 07:51 PM -
drag and drop - disable intra component drop
By tomba in forum AWT / SwingReplies: 4Last Post: 12-09-2009, 01:01 PM -
dynamically changing drop down box on selection in first drop down
By anjali in forum Advanced JavaReplies: 1Last Post: 04-01-2009, 10:28 AM -
Password hiding
By C.A.B.A.L. in forum New To JavaReplies: 4Last Post: 03-04-2009, 08:25 AM -
URL Hiding
By sandeeprao.techno in forum Advanced JavaReplies: 4Last Post: 11-20-2008, 12:55 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks