MCPcopy Create free account
hub / github.com/GateNLP/gate-core / main

Method main

src/main/java/gate/gui/OptionsDialog.java:363–384  ·  view source on GitHub ↗
(String args[])

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 7

getFontMethod · 0.80
addMethod · 0.65
printStackTraceMethod · 0.45
addActionListenerMethod · 0.45
packMethod · 0.45
setVisibleMethod · 0.45
printlnMethod · 0.45

Tested by

no test coverage detected