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]);
		   	 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.77 KB
5 Years
Discussion Span
Last Post by gahhon
Featured Replies

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.


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


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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.