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.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.

Recommended Answers

All 4 Replies

what is it giving you now?

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.

Member Avatar for hfx642

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. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.