File: DHudWindow.java

package info (click to toggle)
mac-widgets 0.10.0%2Bsvn416-dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,968 kB
  • sloc: java: 9,909; makefile: 13; sh: 12
file content (34 lines) | stat: -rw-r--r-- 1,079 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.explodingpixels.macwidgets;

import javax.swing.*;

public class DHudWindow {

    public static void main(String[] args) {

        SwingUtilities.invokeLater(new Runnable() {
            public void run() {

                JFrame frame = new JFrame();
                frame.setSize(400, 400);
                frame.setVisible(true);
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

//                JTextField textField = new JTextField("foo bar");
//                textField.setOpaque(false);
                
                HudWindow hud = new HudWindow("Window", frame);
//                hud.getContentPane().add(textField);
                
                JDialog dialog = hud.getJDialog();
                
//                WindowUtils.createAndInstallRepaintWindowFocusListener(frame);
                dialog.setSize(300, 350);
                dialog.setLocationRelativeTo(null);
                dialog.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                dialog.setVisible(true);
            }
        });
    }

}