Results 1 to 3 of 3
  1. #1
    rtstone is offline Member
    Join Date
    May 2012
    Rep Power

    Default 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:

    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.setDate(new Date());
            TabOneDateListener todl = new TabOneDateListener();
            //  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();
            //  engineer section 
            String uname = System.getProperty("");
            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();
            jpTab0.add(txtEngineer, "4, 18, fill, default");
            //  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");
    My jdk version is:


    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!



  2. #2
    rtstone is offline Member
    Join Date
    May 2012
    Rep Power

    Default 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.



  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: JTextArea is hiding drop downs....

    JDateChooser is not a Swing class. Nor is JCalendar. I suggest you seek help or file a bug report wherever you got these classes or packages.

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. JTextArea on PopUp -JTextArea isn't editable
    By Richy76 in forum AWT / Swing
    Replies: 3
    Last Post: 02-01-2010, 08:51 PM
  2. drag and drop - disable intra component drop
    By tomba in forum AWT / Swing
    Replies: 4
    Last Post: 12-09-2009, 02:01 PM
  3. Replies: 1
    Last Post: 04-01-2009, 11:28 AM
  4. Password hiding
    By C.A.B.A.L. in forum New To Java
    Replies: 4
    Last Post: 03-04-2009, 09:25 AM
  5. URL Hiding
    By sandeeprao.techno in forum Advanced Java
    Replies: 4
    Last Post: 11-20-2008, 01:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts