commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commit-cp] [bug #13141] swing: JTextField invisible with BoxLayout


From: Timo Lindfors
Subject: [commit-cp] [bug #13141] swing: JTextField invisible with BoxLayout
Date: Sat, 21 May 2005 14:22:03 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13141>

                 Summary: swing: JTextField invisible with BoxLayout
                 Project: classpath
            Submitted by: lindi
            Submitted on: Sat 05/21/05 at 14:22
                Category: classpath
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
        Platform Version: None

    _______________________________________________________

Details:

Steps to reproduce:
1. Compile and run the attached testcase

Expected results:
1. A window with two labels and a textfield between the labels shows up.

Actual results:
1. A window with two labels shows up but the textfield is not visible.

Testcase:

import javax.swing.*;
import java.awt.*;
public class jtextfield extends JFrame {
        public static void main(String[] args) {
                (new jtextfield()).show();
        }
        public jtextfield() {
                JPanel panel = new JPanel();
                panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
                panel.add(new JLabel("label1"));
                panel.add(new JTextField(4));
                panel.add(new JLabel("label2"));
                this.setContentPane(panel);
                this.pack();
        }
}

If I comment out the line that does setLayout the textfield is visible.






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13141>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]