From 2310f04336daf445772f9e0c830255bfbf667c0e Mon Sep 17 00:00:00 2001 From: Gavin Li Date: Mon, 23 Feb 2015 20:41:29 -0500 Subject: [PATCH] Reverted to previous --- MerchantRPGCSE2102/src/view/Test.java | 66 +++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 MerchantRPGCSE2102/src/view/Test.java diff --git a/MerchantRPGCSE2102/src/view/Test.java b/MerchantRPGCSE2102/src/view/Test.java new file mode 100644 index 0000000..25ea64b --- /dev/null +++ b/MerchantRPGCSE2102/src/view/Test.java @@ -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); + } +}