-
Bug
-
Resolution: Fixed
-
P1
-
1.3.0
-
None
-
kestrel
-
sparc
-
solaris_2.6, solaris_7
To reproduce this bug, log in under OpenWindows and run the following test case:
import java.awt.event.*;
import java.awt.*;
public class dlg extends Dialog
{
Frame f;
Button bLarger, bSmaller, bCheck, bToggle;
public static void main( String args[] )
{
Frame frame = new Frame("Parent Frame");
frame.add(new Button("Button"));
frame.setSize(100,100);
frame.show();
dlg Dlg = new dlg(frame);
Dlg.showd();
}
public dlg(Frame f_)
{
super(f_, "Dialog", true);
f = f_;
setSize(200,200);
//setResizable(false);
bLarger = new Button("Larger");
bLarger.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setSize(400,400);
}
});
bSmaller = new Button("Smaller");
bSmaller.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setSize(200,100);
}
});
bCheck = new Button("Resizable?");
bCheck.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (isResizable())
System.out.println("Dialog is resizable");
else
System.out.println("Dialog is not resizable");
}
});
bToggle = new Button("Toggle");
bToggle.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (isResizable()) {
setResizable(false);
System.out.println("Dialog is now not resizable");
}
else {
setResizable(true);
System.out.println("Dialog is now resizable");
}
}
});
setLayout(new GridLayout(1,4));
add(bSmaller);
add(bLarger);
add(bCheck);
add(bToggle);
/*
addComponentListener(new ComponentListener() {
public void componentResized(ComponentEvent e) {
System.out.println("Dialog resized");
}
public void componentMoved(ComponentEvent e) {
System.out.println("Dialog moved");
}
public void componentShown(ComponentEvent e) {
System.out.println("Dialog shown");
}
public void componentHidden(ComponentEvent e) {
System.out.println("Dialog hidden");
}
});
*/
}
public void showd() {
setVisible(true);
}
}
The Dialog will appear without any window decorations. The decorations appear
normally under cricket. Note that if you log in under dtwm and change your
window manager to olwm on-the-fly, the decorations appear.
import java.awt.event.*;
import java.awt.*;
public class dlg extends Dialog
{
Frame f;
Button bLarger, bSmaller, bCheck, bToggle;
public static void main( String args[] )
{
Frame frame = new Frame("Parent Frame");
frame.add(new Button("Button"));
frame.setSize(100,100);
frame.show();
dlg Dlg = new dlg(frame);
Dlg.showd();
}
public dlg(Frame f_)
{
super(f_, "Dialog", true);
f = f_;
setSize(200,200);
//setResizable(false);
bLarger = new Button("Larger");
bLarger.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setSize(400,400);
}
});
bSmaller = new Button("Smaller");
bSmaller.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setSize(200,100);
}
});
bCheck = new Button("Resizable?");
bCheck.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (isResizable())
System.out.println("Dialog is resizable");
else
System.out.println("Dialog is not resizable");
}
});
bToggle = new Button("Toggle");
bToggle.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (isResizable()) {
setResizable(false);
System.out.println("Dialog is now not resizable");
}
else {
setResizable(true);
System.out.println("Dialog is now resizable");
}
}
});
setLayout(new GridLayout(1,4));
add(bSmaller);
add(bLarger);
add(bCheck);
add(bToggle);
/*
addComponentListener(new ComponentListener() {
public void componentResized(ComponentEvent e) {
System.out.println("Dialog resized");
}
public void componentMoved(ComponentEvent e) {
System.out.println("Dialog moved");
}
public void componentShown(ComponentEvent e) {
System.out.println("Dialog shown");
}
public void componentHidden(ComponentEvent e) {
System.out.println("Dialog hidden");
}
});
*/
}
public void showd() {
setVisible(true);
}
}
The Dialog will appear without any window decorations. The decorations appear
normally under cricket. Note that if you log in under dtwm and change your
window manager to olwm on-the-fly, the decorations appear.
- duplicates
-
JDK-4254624 Solaris : Print dialog does not have Motif window frame.
-
- Closed
-