Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- /*
- * UserInterface.java
- *
- * Created on 26-jan-2011, 16:37:45
- */
- /**
- *
- * @author martijnzijlstra
- */
- public class UserInterface extends javax.swing.JFrame {
- /** Creates new form UserInterface */
- public UserInterface() {
- initComponents();
- }
- /** This method is called from within the constructor to
- * initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is
- * always regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">
- private void initComponents() {
- jScrollPane1 = new javax.swing.JScrollPane();
- jList1 = new javax.swing.JList();
- jScrollPane2 = new javax.swing.JScrollPane();
- jList2 = new javax.swing.JList();
- jButton1 = new javax.swing.JButton();
- jLabel1 = new javax.swing.JLabel();
- jLabel2 = new javax.swing.JLabel();
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
- jList1.setModel(new javax.swing.AbstractListModel() {
- String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
- public int getSize() { return strings.length; }
- public Object getElementAt(int i) { return strings[i]; }
- });
- jScrollPane1.setViewportView(jList1);
- jList2.setModel(new javax.swing.AbstractListModel() {
- String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
- public int getSize() { return strings.length; }
- public Object getElementAt(int i) { return strings[i]; }
- });
- jScrollPane2.setViewportView(jList2);
- jButton1.setText("Start");
- jLabel1.setText("Attack Mode");
- jLabel2.setText("Food Type");
- org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(layout.createSequentialGroup()
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
- .add(layout.createSequentialGroup()
- .addContainerGap()
- .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 80, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(32, 32, 32)
- .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 81, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
- .addContainerGap()
- .add(jLabel2)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(jLabel1)))
- .add(layout.createSequentialGroup()
- .add(78, 78, 78)
- .add(jButton1)))
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
- .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
- .add(44, 44, 44)
- .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE))
- .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
- .addContainerGap()
- .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .add(jLabel2))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 95, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(jButton1)
- .addContainerGap())
- );
- pack();
- }// </editor-fold>
- /**
- * @param args the command line arguments
- */
- public static void main(String args[]) {
- java.awt.EventQueue.invokeLater(new Runnable() {
- public void run() {
- new UserInterface().setVisible(true);
- }
- });
- }
- // Variables declaration - do not modify
- private javax.swing.JButton jButton1;
- private javax.swing.JLabel jLabel1;
- private javax.swing.JLabel jLabel2;
- private javax.swing.JList jList1;
- private javax.swing.JList jList2;
- private javax.swing.JScrollPane jScrollPane1;
- private javax.swing.JScrollPane jScrollPane2;
- // End of variables declaration
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement