Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to specify size for a JOptionpane showOptionDialog

 
Kiran Baratam
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am using JOptionpane showOptionDialog to show the confirmation vales entered ina screen and providing 2 butons ok and cancel.
i am using GridLAyout to display the field names and values.
I am able to display all the information but i want to increase the size of the frame.
Is it possible to do.
Regards
Kiran
 
VIJAY Yadlapati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this code..
JOptionPane pane = new JOptionPane(args..);
JDialog dialog = pane.createDialog(parent, title);
dialog.setSize(newSize);
dialog.show();
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic