convex.gui.manager.windows.BaseWindow Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of convex-gui Show documentation
Show all versions of convex-gui Show documentation
Convex desktop GUI and test applications
package convex.gui.manager.windows;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import convex.gui.manager.PeerGUI;
@SuppressWarnings("serial")
public abstract class BaseWindow extends JPanel {
protected final PeerGUI manager;
public BaseWindow(PeerGUI manager) {
super();
this.manager = manager;
setLayout(new BorderLayout());
}
public abstract String getTitle();
public JFrame launch() {
JFrame f = new JFrame(getTitle());
f.getContentPane().add(this);
f.pack();
f.setVisible(true);
f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
f.setLocationRelativeTo(PeerGUI.getFrame());
return f;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy