[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug swing/24904] New: JSplitPanes show a magic Button when one of the c
From: |
abalkiss at redhat dot com |
Subject: |
[Bug swing/24904] New: JSplitPanes show a magic Button when one of the components is null |
Date: |
16 Nov 2005 19:47:08 -0000 |
The testcase pasted below shows that showing a JSplitPane that was initialized
with one component being null magically makes a JButton with the label "left
button" appear as that component. This does not happen with the JDK. Perhaps
it needs to be hidden (ie, size of 0).
***TESTCASE***
import java.awt.*;
import javax.swing.*;
public class G3 extends JComponent
{
public void paintComponent( Graphics g ) {
g.setColor( new Color( 0xe0, 0xe0, 0xf0 ));
g.fillRect( 0, 0, 400, 400 );
}
public Dimension getPreferredSize() {
return new Dimension(400,400);
}
public static void main( String args[] ) {
JFrame frame = new JFrame( "layout tests" );
G3 gc1 = new G3();
JScrollPane sp1 = new JScrollPane( gc1 );
JSplitPane splitPane = new
JSplitPane(JSplitPane.HORIZONTAL_SPLIT, false, null, sp1 );
frame.getContentPane().add( "Center", splitPane );
frame.pack();
frame.show();
}
}
--
Summary: JSplitPanes show a magic Button when one of the
components is null
Product: classpath
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: swing
AssignedTo: abalkiss at redhat dot com
ReportedBy: abalkiss at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24904
- [Bug swing/24904] New: JSplitPanes show a magic Button when one of the components is null,
abalkiss at redhat dot com <=