Removed unnecessary files, and ready to implement
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.event.ComponentAdapter;
|
||||
import java.awt.event.ComponentEvent;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
|
||||
public class GUI extends JFrame
|
||||
@@ -12,22 +14,32 @@ public class GUI extends JFrame
|
||||
{
|
||||
super("Gui");
|
||||
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||
|
||||
// JPanel contentPane = new JPanel(new BorderLayout());
|
||||
// this.setContentPane(contentPane);
|
||||
// this.setSize(600, 600);
|
||||
// this.setVisible(true);
|
||||
// System.out.println(contentPane.getWidth());
|
||||
// timeline = new Timeline(contentPane);
|
||||
// contentPane.add(timeline,BorderLayout.CENTER);
|
||||
// contentPane.add(timeline.createWestPanel(), BorderLayout.WEST);
|
||||
// timeline.refresh();
|
||||
TimelinePanel panel = new TimelinePanel();
|
||||
this.setContentPane(panel);
|
||||
this.setSize(600, 600);
|
||||
timeline = new Timeline(this);
|
||||
|
||||
|
||||
this.setContentPane(timeline.getTimeline());
|
||||
this.setVisible(true);
|
||||
|
||||
this.getRootPane().addComponentListener(new ComponentAdapter()
|
||||
{
|
||||
public void componentResized(ComponentEvent e) {
|
||||
timeline.refresh();
|
||||
panel.refresh();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
this.setVisible(true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user