-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathMockBox.java
More file actions
38 lines (31 loc) · 957 Bytes
/
MockBox.java
File metadata and controls
38 lines (31 loc) · 957 Bytes
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
35
36
37
38
package nodebox.versioncheck;
import javax.swing.*;
import java.awt.*;
/**
* Demo application using freshbeans.
* <p/>
* Hosts its own server.
*/
public class MockBox extends MockHost {
private MockAppcastServer server;
private Thread serverThread;
private Updater updater;
public MockBox() throws HeadlessException {
updater = new Updater(this);
server = new MockAppcastServer(MockHost.APPCAST_SERVER_PORT);
serverThread = new Thread(server);
serverThread.start();
}
public void start() {
JFrame mainFrame = new JFrame("MockBox");
mainFrame.setSize(700, 500);
mainFrame.setLocationByPlatform(true);
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mainFrame.setVisible(true);
updater.applicationDidFinishLaunching();
}
public static void main(String[] args) {
MockBox mb = new MockBox();
mb.start();
}
}