-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gavin Li
committed
Feb 24, 2015
1 parent
a823a7f
commit 2310f04
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package view; | ||
|
||
import java.awt.BorderLayout; | ||
import java.awt.EventQueue; | ||
|
||
import javax.swing.JFrame; | ||
import javax.swing.JPanel; | ||
import javax.swing.border.EmptyBorder; | ||
import javax.swing.JComboBox; | ||
import javax.swing.JTextField; | ||
import javax.swing.JSlider; | ||
import javax.swing.JLabel; | ||
import javax.swing.JButton; | ||
|
||
public class Test extends JFrame { | ||
|
||
private JPanel contentPane; | ||
|
||
/** | ||
* Launch the application. | ||
*/ | ||
public static void main(String[] args) { | ||
EventQueue.invokeLater(new Runnable() { | ||
public void run() { | ||
try { | ||
Test frame = new Test(); | ||
frame.setVisible(true); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
}); | ||
} | ||
|
||
/** | ||
* Create the frame. | ||
*/ | ||
public Test() { | ||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | ||
setBounds(100, 100, 400, 400); | ||
contentPane = new JPanel(); | ||
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); | ||
setContentPane(contentPane); | ||
contentPane.setLayout(null); | ||
|
||
JComboBox comboBox = new JComboBox(); | ||
comboBox.setBounds(61, 141, 131, 20); | ||
contentPane.add(comboBox); | ||
|
||
JSlider slider = new JSlider(); | ||
slider.setBounds(61, 237, 200, 26); | ||
contentPane.add(slider); | ||
|
||
JLabel lblSelectTheItem = new JLabel("Select the Item you want:"); | ||
lblSelectTheItem.setBounds(61, 105, 168, 14); | ||
contentPane.add(lblSelectTheItem); | ||
|
||
JLabel lblSelectTheAmount = new JLabel("Select the amount:"); | ||
lblSelectTheAmount.setBounds(61, 197, 131, 14); | ||
contentPane.add(lblSelectTheAmount); | ||
|
||
JButton btnAccept = new JButton("Accept"); | ||
btnAccept.setBounds(247, 306, 89, 23); | ||
contentPane.add(btnAccept); | ||
} | ||
} |