/**
* Main class, so you can have an example. You can put your own attribute names in parameter
*/
public static void main(String[] args) {
IFrame frame = new Frame();
String tmpDeviceName = null;
if (args != null && args.length > 0) {
tmpDeviceName = args[0];
}
else {
tmpDeviceName = "tango/tangotest/titan";
}
StatusTextArea f = new StatusTextArea();
f.setSize(300, 300);
f.setPreferredSize(f.getSize());
f.setDeviceName(tmpDeviceName);
f.setEnabled(true);
f.initDAO();
final JLabel label = new JLabel("click here to loose focus");
label.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
label.grabFocus();
}
});
JPanel panel = new JPanel(new BorderLayout());
panel.add(f, BorderLayout.CENTER);
panel.add(label, BorderLayout.SOUTH);
frame.setContentPane(panel);
frame.setSize(640, 480);
frame.setTitle(f.getClass().getName());
frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
label.grabFocus();
}