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

    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.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");
    My jdk version is:

    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

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

    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.

    cheers,

    Robert

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    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.

    db
    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, 07:51 PM
  2. drag and drop - disable intra component drop
    By tomba in forum AWT / Swing
    Replies: 4
    Last Post: 12-09-2009, 01:01 PM
  3. Replies: 1
    Last Post: 04-01-2009, 10:28 AM
  4. Password hiding
    By C.A.B.A.L. in forum New To Java
    Replies: 4
    Last Post: 03-04-2009, 08:25 AM
  5. URL Hiding
    By sandeeprao.techno in forum Advanced Java
    Replies: 4
    Last Post: 11-20-2008, 12: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
  •