Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
2102-Group-Project-Spring-2017/src/view/MainWindow.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
56 lines (46 sloc)
1.07 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package view; | |
import java.awt.*; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
public class MainWindow { | |
private JFrame frame; | |
/** | |
* Launch the application. | |
*/ | |
public static void main(String[] args) { | |
EventQueue.invokeLater(new Runnable() { | |
public void run() { | |
try { | |
MainWindow window = new MainWindow(); | |
window.frame.setVisible(true); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
} | |
}); | |
} | |
/** | |
* Create the application. | |
*/ | |
public MainWindow() { | |
initialize(); | |
} | |
/** | |
* Initialize the contents of the frame. | |
*/ | |
private void initialize() { | |
frame = new JFrame(); | |
frame.setExtendedState(JFrame.MAXIMIZED_BOTH); | |
//frame.setBackground(new Color(186,85,211)); | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
//frame.getContentPane().setLayout(null); | |
frame.setVisible(true); | |
JPanel panel = new JPanel(); | |
panel.setBackground(new Color(186,85,211)); | |
frame.getContentPane().add(panel); | |
panel.setLayout(null); | |
JPanel panel_1 = new JPanel(); | |
panel_1.setBounds(6, 6, 48, 47); | |
panel.add(panel_1); | |
} | |
} |