(String args[])
| 361 | } |
| 362 | |
| 363 | public static void main(String args[]){ |
| 364 | try{ |
| 365 | UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); |
| 366 | }catch(Exception e){ |
| 367 | e.printStackTrace(); |
| 368 | } |
| 369 | final JFrame frame = new JFrame("Foo frame"); |
| 370 | frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); |
| 371 | JButton btn = new JButton("Show dialog"); |
| 372 | btn.addActionListener(new ActionListener() { |
| 373 | @Override |
| 374 | public void actionPerformed(ActionEvent e) { |
| 375 | OptionsDialog dialog = new OptionsDialog(frame); |
| 376 | dialog.pack(); |
| 377 | dialog.showDialog(); |
| 378 | } |
| 379 | }); |
| 380 | frame.getContentPane().add(btn); |
| 381 | frame.pack(); |
| 382 | frame.setVisible(true); |
| 383 | System.out.println("Font: " + UIManager.getFont("Button.font")); |
| 384 | }// main |
| 385 | |
| 386 | |
| 387 | protected static void setUIDefaults(Object[] keys, Object value) { |
nothing calls this directly
no test coverage detected