- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package gui;
- /**
- *
- * @author Artur
- */
- public class RBFishingGuild extends javax.swing.JFrame {
- /**
- * Creates new form RBFishingGuild
- */
- public RBFishingGuild() {
- 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() {
- Title = new javax.swing.JLabel();
- Description = new javax.swing.JLabel();
- whatToFishLabel = new javax.swing.JLabel();
- whatToFishBox = new javax.swing.JComboBox();
- Start = new javax.swing.JButton();
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("RBFishingGuild");
- Title.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
- Title.setText("RBFishingGuild");
- Description.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
- Description.setText("Your automated Fishing Guild Fisher.");
- whatToFishLabel.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
- whatToFishLabel.setText("What to fish:");
- whatToFishBox.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
- whatToFishBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Tuna and Swordfish", "Bass", "Lobster", "Shark" }));
- whatToFishBox.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- whatToFishBoxActionPerformed(evt);
- }
- });
- Start.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
- Start.setText("Start");
- Start.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- StartActionPerformed(evt);
- }
- });
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(Start, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(whatToFishLabel)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(whatToFishBox, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGroup(layout.createSequentialGroup()
- .addGap(24, 24, 24)
- .addComponent(Description))))
- .addGroup(layout.createSequentialGroup()
- .addGap(57, 57, 57)
- .addComponent(Title)))
- .addContainerGap(32, Short.MAX_VALUE))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(Title)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(Description)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(whatToFishLabel)
- .addComponent(whatToFishBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
- .addComponent(Start))
- );
- pack();
- }// </editor-fold>
- private void StartActionPerformed(java.awt.event.ActionEvent evt) {
- dispose();
- }
- private void whatToFishBoxActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- /**
- * @param args the command line arguments
- */
- public static void main(String args[]) {
- /*
- * Set the Nimbus look and feel
- */
- //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
- /*
- * If Nimbus (introduced in Java SE 6) is not available, stay with the
- * default look and feel. For details see
- * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
- */
- try {
- for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
- if ("Nimbus".equals(info.getName())) {
- javax.swing.UIManager.setLookAndFeel(info.getClassName());
- break;
- }
- }
- } catch (ClassNotFoundException ex) {
- java.util.logging.Logger.getLogger(RBFishingGuild.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (InstantiationException ex) {
- java.util.logging.Logger.getLogger(RBFishingGuild.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (IllegalAccessException ex) {
- java.util.logging.Logger.getLogger(RBFishingGuild.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- } catch (javax.swing.UnsupportedLookAndFeelException ex) {
- java.util.logging.Logger.getLogger(RBFishingGuild.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- //</editor-fold>
- /*
- * Create and display the form
- */
- java.awt.EventQueue.invokeLater(new Runnable() {
- public void run() {
- new RBFishingGuild().setVisible(true);
- }
- });
- }
- // Variables declaration - do not modify
- private javax.swing.JLabel Description;
- private javax.swing.JButton Start;
- private javax.swing.JLabel Title;
- private javax.swing.JComboBox whatToFishBox;
- private javax.swing.JLabel whatToFishLabel;
- // End of variables declaration
- }