-
Notifications
You must be signed in to change notification settings - Fork 0
/
OmegaMonitor.java
68 lines (61 loc) · 2.04 KB
/
OmegaMonitor.java
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package omega.monitor;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Frame;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.ListIterator;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
public class OmegaMonitor
{
public static void main(String[] args) throws Exception
{
// assigning all variables needed prior to runtime
Properties props = new Properties();
FileInputStream _fin = new FileInputStream("properties.config");
props.load(_fin);
final String _host = props.getProperty("login.location");
String _port = props.getProperty("login.location.port");
final int _intport = Integer.parseInt(_port);
_fin.close();
Socket _socket = null;
PrintWriter _pout = null;
BufferedReader _bin = null;
String s = null;
ArrayList<String> _list = new ArrayList<String>();
OmegaTableFrame _frame = new OmegaTableFrame();
JScrollPane _scrollpane = new JScrollPane();
OmegaTableModel _tablemodel = new OmegaTableModel(_list);
JTable _table = new JTable(_tablemodel);
_table.setVisible(true);
_scrollpane.add(_table);
_scrollpane.setVisible(true);
_frame.add(_scrollpane);
_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
_frame.setVisible(true);
FileInputStream fstream = new FileInputStream("loader_file.in");
DataInputStream dinstream = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(dinstream));
while ((br.readLine() != null)) {
System.out.println(br.readLine());
}
System.out.println("File ended.");
dinstream.close();
}
}