• Post Reply Bookmark Topic Watch Topic
  • New Topic

JOptionPane  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have created a JDialog using JOption.createDialog(xx,xx)method. I have set the size for the JDialog, but it doesn't appear at the right size I have set for it.
Any idea?
Thanks.
Sabbir
 
Tom P
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't had any problems with doing this. Can you give a little more information as to what you are doing and what results you are getting back? Perhaps a code sample that doesn't work the way you expect it to?
[This message has been edited by Tom P (edited May 19, 2000).]
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code segment is as follows:
JOptionPane myDialogPane = new JOptionPane("Excellent! You have managed to answer correctly in your 1st attempt");
myDialogPane.setIcon(Cross);
myDialogPane.setSize(new Dimension(300,100));

Object option = new String("OK");
JDialog dia = myDialogPane.createDialog(QM_Frame.this,"Try again");
dia.setSize(new Dimension(300,100));
dia.show();
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!