-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.2.0
-
sparc
-
solaris_2.5
The following commnet is from one of our customers :
> SwingSet/pack problem
> ---------------------
> In the SwingSet example program, the initial progress window does not
> display correctly. The contents of the window do not appear. I encountered
> this same problem when I switched to jdk1.1.5. In my windows that called
> setSize,validate instead of pack, the window contents did not appear. I
> submitted this to Sun, and they dismissed it as a "user's error", however
> in previous jdk versions there was no requirement to call pack. This
> bug can be fixed in SwingSet by adding pack prior to the calls to setSize.
>
> Mary Ann Widing
Note : This bug only shows on Solaris 2.5.1.. It's fine with Solaris 2.6.1.
Here is a simple test for you to demostrate this bug :
import java.awt.*;
import java.awt.event.*;
import java.lang.*;
import com.sun.java.swing.*;
public class JPackTest extends JFrame{
JPackTest(){
JPanel testPanel = new JPanel(new BorderLayout());
testPanel.add(new Label("hello"),BorderLayout.CENTER);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(testPanel,BorderLayout.CENTER);
//pack();
setSize(100,100);
validate();
}
public static void main(String args[]){
JPackTest mainWindow = new JPackTest();
mainWindow.show();
mainWindow.setVisible(true);
}
}
> SwingSet/pack problem
> ---------------------
> In the SwingSet example program, the initial progress window does not
> display correctly. The contents of the window do not appear. I encountered
> this same problem when I switched to jdk1.1.5. In my windows that called
> setSize,validate instead of pack, the window contents did not appear. I
> submitted this to Sun, and they dismissed it as a "user's error", however
> in previous jdk versions there was no requirement to call pack. This
> bug can be fixed in SwingSet by adding pack prior to the calls to setSize.
>
> Mary Ann Widing
Note : This bug only shows on Solaris 2.5.1.. It's fine with Solaris 2.6.1.
Here is a simple test for you to demostrate this bug :
import java.awt.*;
import java.awt.event.*;
import java.lang.*;
import com.sun.java.swing.*;
public class JPackTest extends JFrame{
JPackTest(){
JPanel testPanel = new JPanel(new BorderLayout());
testPanel.add(new Label("hello"),BorderLayout.CENTER);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(testPanel,BorderLayout.CENTER);
//pack();
setSize(100,100);
validate();
}
public static void main(String args[]){
JPackTest mainWindow = new JPackTest();
mainWindow.show();
mainWindow.setVisible(true);
}
}
- duplicates
-
JDK-4102519 SwingSet "Loading" dialog box appears solid blue using OpenWindows
-
- Closed
-