[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commit-cp] [bug #13154] swing: JTextField invisible with nested BoxLayo
From: |
Timo Lindfors |
Subject: |
[commit-cp] [bug #13154] swing: JTextField invisible with nested BoxLayouts |
Date: |
Sun, 22 May 2005 19:27:00 +0000 |
User-agent: |
Elinks |
URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13154>
Summary: swing: JTextField invisible with nested BoxLayouts
Project: classpath
Submitted by: lindi
Submitted on: Sun 05/22/05 at 19:27
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 shows up. It has the following elements from right to left:
"label3", "label1", a textfield, "label2" and "label4".
Actual results (classpath 2005-05-22):
1. A window shows up but it has no visible elements.
Actual results (classpath 2005-05-21):
1. A window shows up. It has the expected labels in the right order but no
textfield is visible.
Testcase:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
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"));
JPanel panel2 = new JPanel();
panel2.setLayout(new BoxLayout(panel2, BoxLayout.X_AXIS)); //
[1]
panel2.add(new JLabel("label3"));
panel2.add(panel);
panel2.add(new JLabel("label4"));
this.setContentPane(panel2);
this.pack();
}
}
Bug #13141 was fixed between 2005-05-21 and 2005-05-22. It is likely that the
fix caused the labels to become invisible in this testcase. Note that if I
comment out the line[1] that sets layout for the outer panel then all labels
and the textarea are rendered correctly.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13154>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [commit-cp] [bug #13154] swing: JTextField invisible with nested BoxLayouts,
Timo Lindfors <=