public UserFrame() {
		super("Hibernate user client");
		
		alarms = new ArrayList<Alarm>();
		hardwares = new ArrayList<NetworkHardware>();
		links = new ArrayList<Link>();
		
		graph = new mxGraph();
		graphLayout = new mxCircleLayout(graph);		
		graphPane = new mxGraphComponent(graph);
		
		propertyTableModel = new ElementUserTableModel();
		propertyTable = new JTable(propertyTableModel);
		alarmTableModel = new AlarmTableModel();
		alarmTable = new JTable(alarmTableModel);
		refreshButton = new JButton("Refresh");
		alarmTypeComboBox = new JComboBox<String>();
		allRadioButton = new JRadioButton("All alarms");
		selectedRadioButton = new JRadioButton("Only for selected");
		
		initComponents();
		
		allRadioButton.setSelected(true);
		
    	alarmTypeComboBox.addItem("ALL");
    	alarmTypeComboBox.addItem("INFO");
    	alarmTypeComboBox.addItem("WARNING");
    	alarmTypeComboBox.addItem("ERROR");
    	alarmTypeComboBox.addItem("FATAL");
    	
    	refreshButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				refresh();
			}
		});
    	alarmTypeComboBox.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				refreshAlarmList();
			}
		});
    	graph.getSelectionModel().addListener(mxEvent.CHANGE, new mxIEventListener() {
			@Override
			public void invoke(Object arg0, mxEventObject arg1) {
				mxCell cell = (mxCell) graph.getSelectionCell();
				if(cell == null)
					return;
				if(cell.isVertex()) {
					selectedHW = vertexToHardwareMap.get(cell);
					if(selectedHW != null) 
						propertyTableModel.setProperties(selectedHW.getProperties());
					else
						propertyTableModel.setProperties(new TreeMap<String, Object>());
					refreshAlarmList();
				}
			}
		});
    	allRadioButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				refreshAlarmList();
			}
		});
    	selectedRadioButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				refreshAlarmList();
			}
		});   	
    	
		refresh();
		
		alarmTypeComboBox.setSelectedIndex(0);
		
		this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
		this.setSize(905, 705);
		this.setResizable(false);
		this.setVisible(true);
	}