Fix default close operation (exit app on cross button didn't close the application. Add generated serial id
This commit is contained in:
parent
f7c1b4f73a
commit
82847fd740
@ -12,6 +12,8 @@ import java.util.List;
|
||||
|
||||
public class Preview extends JFrame {
|
||||
|
||||
private static final long serialVersionUID = -8104236322964434859L;
|
||||
|
||||
static final int VIEW_WIDTH = 256;
|
||||
static final int VIEW_HEIGHT = 128;
|
||||
|
||||
@ -32,6 +34,9 @@ public class Preview extends JFrame {
|
||||
|
||||
public Preview() throws HeadlessException {
|
||||
model = new ArrayList<>();
|
||||
|
||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
|
||||
// UI elements
|
||||
JMenuBar menuBar = new JMenuBar();
|
||||
setJMenuBar(menuBar);
|
||||
|
Loading…
Reference in New Issue
Block a user