954,523 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

JOptionPane.showOptionDialog

String SearchBroadCastMenu[] = new String[] {"Search Item Code", "Search Title", "Search Country of Origin", "Search Language", "Search Status", "Search Director", "Search Actor", "Search Producer", "Search Frequency", "Return To Previous"};
		UIManager.put("OptionPane.messageFont", new FontUIResource(new Font("Tw Cen MT Condensed",Font.PLAIN,18)));
		UIManager.put("OptionPane.messageForeground", java.awt.Color.blue);
		UIManager.put("OptionPane.buttonFont", new FontUIResource(new Font("Tw Cen MT Condensed",Font.PLAIN,18)));
		int SearchBroadCastOption = JOptionPane.showOptionDialog(null, "                                                                                          ORTSA SDN. BHD - SEARCH BROADCAST MENU           ", "Main Program Menu", JOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, null, SearchBroadCastMenu, SearchBroadCastMenu[0]);
		   switch(SearchBroadCastOption){
		   	 case 0: searchItemCode(); break;
		   	 case 1: searchTitle(); break;
		   	 case 2: searchCountryOfOrigin(); break;
		   	 case 3: searchLanguage(); break;
		   	 case 4: searchStatus(); break;
		   	 case 5: searchDirector(); break;
		   	 case 6: searchActor(); break;
		   	 case 7: searchProducer(); break;
		   	 case 8: searchFrequency(); break;
		   	 case 9: BroadCastMenu(); break;
		   	 default: break;
		   }


the pop-up window is too big for my computer resolution, what should i do to make the button arrange like this picture.

Attachments Capture.JPG 25.77KB
gahhon
Junior Poster
198 posts since Jul 2010
Reputation Points: 23
Solved Threads: 0
 

what is it giving you now?

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

it is giving me one straight line button from left to right. :(
but it is too long already, make my computer resolution cannot view it all.
so i want arrange the button top to down.

gahhon
Junior Poster
198 posts since Jul 2010
Reputation Points: 23
Solved Threads: 0
 

Create the component layout that you want on a JPanel,
and display YOUR JPanel via the JOptionPane.

hfx642
Posting Pro
515 posts since Nov 2009
Reputation Points: 248
Solved Threads: 105
 

now i've solved the problem by using JPanel & JFrame.
Thanks for helping. :)

gahhon
Junior Poster
198 posts since Jul 2010
Reputation Points: 23
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You