-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1.5
-
x86
-
windows_nt
Name: rk38400 Date: 04/13/98
On Windows NT 4.0, using JDK 1.1.5 and JFC 1.1 (Swing 1.0.1):
Each of the JOptionPane.showMessageDialog's with different Titles are displayed with the first title "First Title!". Other tests show this problem exists in general for me using showXXXDialog().
import com.sun.java.swing.*;
import java.awt.event.*;
public class bug
{
JFrame frame = null;
JDesktopPane desktop = null;
public static void main( String args[] )
{
new bug();
}
public bug()
{
frame = new JFrame( "Frame Title" );
desktop = new JDesktopPane();
frame.getContentPane().add( desktop );
frame.addWindowListener( new WindowAdapter()
{
public void windowClosing( WindowEvent e )
{
System.exit( 0 );
}
} );
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu( "Menu" );
menuBar.add( menu );
JMenuItem doit = new JMenuItem( "Doit" );
menu.add( doit );
doit.addActionListener( new ActionListener()
{
public void actionPerformed( ActionEvent e )
{
JOptionPane.showMessageDialog( frame,
"This is the First Message",
"First Title",
JOptionPane.INFORMATION_MESSAGE );
JOptionPane.showMessageDialog( frame,
"This is the Second Message",
"Second Title",
JOptionPane.INFORMATION_MESSAGE );
JOptionPane.showMessageDialog( frame,
"This is the Third Message",
"Third Title",
JOptionPane.INFORMATION_MESSAGE );
JOptionPane.showMessageDialog( frame,
"This is the Forth and Final Message\n" +
"My Titles have been all set to " +
"'First Title'",
"Forth Title",
JOptionPane.INFORMATION_MESSAGE );
}
} );
frame.setJMenuBar( menuBar );
frame.setBounds( 200, 200, 640, 480 );
frame.setVisible( true );
}
}
(Review ID: 26585)
======================================================================
- duplicates
-
JDK-4120856 win32: setTitle on modal dialogs will fail to change the title
-
- Closed
-