Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I customised the Ok-Cancel Button in JOptionPane

 
Rohit Kedia
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I make this size like the Above Search Button
untitled.jpg
[Thumbnail for untitled.jpg]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
really looks like you should be using a modal JDialog (instead of the simplified JOptionPane),
then you can easily do just about anything you want with it.
 
Rohit Kedia
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sir ,
But I have to used JOptionPane only because I have here a popup actually a JPanel from where user can select a User Info by Searching and after selecting that information he can add that in the JTextField.

So thats why I had shifted from JFrame to JOptionPane.

For that also I had raised Posts earlier in this Forum.
I had been sugessted to use a JOptionPane and which actually worked perfectly.
 
Rob Spoor
Sheriff
Pie
Posts: 20608
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But now your requirements have changed, and therefore also the solution.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic