9 Replies - 789 Views - Last Post: 18 April 2013 - 04:08 PM Rate Topic: -----

#1 BigD959919   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 26-March 12

Opening another Jframe from an actionlister on one Jframe

Posted 18 April 2013 - 08:54 AM

I am trying to open another JFrame form I made in netbeans from a JMenuitem I have on my main JFrame. I have an actionlistener on the menu item with the following code:

private void bottlesMenuActionPerformed(java.awt.event.ActionEvent evt) {                                            
        BottleLoader loader = new BottleLoader();
        loader.setVisible(true);
    }


but I am getting an error on BottleLoader saying

cant find symbol
symbol: class BottleLoader
location: class DispenderGUI

I tried googling and I found a few youtube videos on the same subject and they all did the same thing I did but their code compiles and mine does not.

Is This A Good Question/Topic? 0
  • +

Replies To: Opening another Jframe from an actionlister on one Jframe

#2 darek9576   User is offline

  • D.I.C Lover

Reputation: 204
  • View blog
  • Posts: 1,747
  • Joined: 13-March 10

Re: Opening another Jframe from an actionlister on one Jframe

Posted 18 April 2013 - 09:12 AM

You could make it easy for us and post BottleLoader class.
Was This Post Helpful? 1
  • +
  • -

#3 BigD959919   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 26-March 12

Re: Opening another Jframe from an actionlister on one Jframe

Posted 18 April 2013 - 09:29 AM

netbeans code beware

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author dpeters
 */
public class BottleLoader extends javax.swing.JFrame {

    /**
     * Creates new form BottleLoader
     */
    public BottleLoader() {
        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() {

        bottle1Label = new javax.swing.JLabel();
        bottle2Label = new javax.swing.JLabel();
        bottle3Label = new javax.swing.JLabel();
        bottle4Label = new javax.swing.JLabel();
        bottle5Label = new javax.swing.JLabel();
        bottle6Label = new javax.swing.JLabel();
        bottle1Combo = new javax.swing.JComboBox();
        bottle2Combo = new javax.swing.JComboBox();
        bottle3Combo = new javax.swing.JComboBox();
        bottle4Combo = new javax.swing.JComboBox();
        bottle6Combo = new javax.swing.JComboBox();
        bottle5Combo = new javax.swing.JComboBox();
        bottleloaderConfirm = new javax.swing.JButton();
        bottleloaderCancel = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Automatic Drink Dispenser - Bottle Loader");

        bottle1Label.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottle1Label.setText("Bottle 1: ");

        bottle2Label.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottle2Label.setText("Bottle 2: ");

        bottle3Label.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottle3Label.setText("Bottle 3: ");

        bottle4Label.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottle4Label.setText("Bottle 4: ");

        bottle5Label.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottle5Label.setText("Bottle 5: ");

        bottle6Label.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottle6Label.setText("Bottle 6:");

        bottle1Combo.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottle1Combo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Apple Cider", "Apple Juice", "Apple Spiced Cider", "Apricot Juice", "Black Cherry Juice", "Blackberry Juice", "Blueberry Juice", "Blueberry Pomegranate", "Brandy (Armagnac)", "Brandy (Cognac)", "Brandy (Fruit)", "Boysenberry Juice", "Carrot Juice", "Celery Juice", "Cherry Juice", "Cocunut Juice", "Coconut Milk", "Cranberry Juice", "Cranberry Blueberry Juice", "Cranberry Pomegranate Juice", "Cranberry Raspberry Juice", "Cucumber Juice", "Energy Drink", "Fruit Punch", "Gin", "Grape (Concord) Juice", "Grape (White) Juice", "Grapefruit (Pink) Juice", "Grapefruit (White) Juice", "Kiwi Strawberry Juice", "Kool-Aid", "Lemonade", "Lemon Juice", "Limeade", "Lime Juice", "Liqueur (Amaretto)", "Liqueur (Kahlua)", "Liqueur (Vermouth)", "Liqueur (Irish Cream)", "Liqueur (Marachino)", "Liqueur (Orange)", "Mango Juice", "Milk", "Nectarine Juice", "Orange Juice", "Orange Liqueur", "Papaya Juice", "Pear Juice", "Pineapple Juice", "Plum Juice", "Pomegranate Juice", "Prune Juice", "Razzleberry Juice", "Rum", "Sweet Tea", "Tangerine Juice", "Tea", "Tequila", "Tomato Juice", "Vegetable Juice", "Vermouth", "Vodka", "Watermelon Lemonade", "Whiskey (Bourbon)", "Whiskey (Canadian)", "Whiskey (Irish)", "Whiskey (Japanese)", "Whiskey (ManX)", "Whiskey (Rye)", "Whiskey (Scotch)", "Whiskey (Tennessee)", "Wine (Red)", "Wine (Rose)", "Wine (Sparkling)", "Wine (White)" }));

        bottle2Combo.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottle2Combo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Apple Cider", "Apple Juice", "Apple Spiced Cider", "Apricot Juice", "Black Cherry Juice", "Blackberry Juice", "Blueberry Juice", "Blueberry Pomegranate", "Brandy (Armagnac)", "Brandy (Cognac)", "Brandy (Fruit)", "Boysenberry Juice", "Carrot Juice", "Celery Juice", "Cherry Juice", "Cocunut Juice", "Coconut Milk", "Cranberry Juice", "Cranberry Blueberry Juice", "Cranberry Pomegranate Juice", "Cranberry Raspberry Juice", "Cucumber Juice", "Energy Drink", "Fruit Punch", "Gin", "Grape (Concord) Juice", "Grape (White) Juice", "Grapefruit (Pink) Juice", "Grapefruit (White) Juice", "Kiwi Strawberry Juice", "Kool-Aid", "Lemonade", "Lemon Juice", "Limeade", "Lime Juice", "Liqueur (Amaretto)", "Liqueur (Kahlua)", "Liqueur (Vermouth)", "Liqueur (Irish Cream)", "Liqueur (Marachino)", "Liqueur (Orange)", "Mango Juice", "Milk", "Nectarine Juice", "Orange Juice", "Orange Liqueur", "Papaya Juice", "Pear Juice", "Pineapple Juice", "Plum Juice", "Pomegranate Juice", "Prune Juice", "Razzleberry Juice", "Rum", "Sweet Tea", "Tangerine Juice", "Tea", "Tequila", "Tomato Juice", "Vegetable Juice", "Vermouth", "Vodka", "Watermelon Lemonade", "Whiskey (Bourbon)", "Whiskey (Canadian)", "Whiskey (Irish)", "Whiskey (Japanese)", "Whiskey (ManX)", "Whiskey (Rye)", "Whiskey (Scotch)", "Whiskey (Tennessee)", "Wine (Red)", "Wine (Rose)", "Wine (Sparkling)", "Wine (White)" }));

        bottle3Combo.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottle3Combo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Apple Cider", "Apple Juice", "Apple Spiced Cider", "Apricot Juice", "Black Cherry Juice", "Blackberry Juice", "Blueberry Juice", "Blueberry Pomegranate", "Brandy (Armagnac)", "Brandy (Cognac)", "Brandy (Fruit)", "Boysenberry Juice", "Carrot Juice", "Celery Juice", "Cherry Juice", "Cocunut Juice", "Coconut Milk", "Cranberry Juice", "Cranberry Blueberry Juice", "Cranberry Pomegranate Juice", "Cranberry Raspberry Juice", "Cucumber Juice", "Energy Drink", "Fruit Punch", "Gin", "Grape (Concord) Juice", "Grape (White) Juice", "Grapefruit (Pink) Juice", "Grapefruit (White) Juice", "Kiwi Strawberry Juice", "Kool-Aid", "Lemonade", "Lemon Juice", "Limeade", "Lime Juice", "Liqueur (Amaretto)", "Liqueur (Kahlua)", "Liqueur (Vermouth)", "Liqueur (Irish Cream)", "Liqueur (Marachino)", "Liqueur (Orange)", "Mango Juice", "Milk", "Nectarine Juice", "Orange Juice", "Orange Liqueur", "Papaya Juice", "Pear Juice", "Pineapple Juice", "Plum Juice", "Pomegranate Juice", "Prune Juice", "Razzleberry Juice", "Rum", "Sweet Tea", "Tangerine Juice", "Tea", "Tequila", "Tomato Juice", "Vegetable Juice", "Vermouth", "Vodka", "Watermelon Lemonade", "Whiskey (Bourbon)", "Whiskey (Canadian)", "Whiskey (Irish)", "Whiskey (Japanese)", "Whiskey (ManX)", "Whiskey (Rye)", "Whiskey (Scotch)", "Whiskey (Tennessee)", "Wine (Red)", "Wine (Rose)", "Wine (Sparkling)", "Wine (White)" }));

        bottle4Combo.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottle4Combo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Apple Cider", "Apple Juice", "Apple Spiced Cider", "Apricot Juice", "Black Cherry Juice", "Blackberry Juice", "Blueberry Juice", "Blueberry Pomegranate", "Brandy (Armagnac)", "Brandy (Cognac)", "Brandy (Fruit)", "Boysenberry Juice", "Carrot Juice", "Celery Juice", "Cherry Juice", "Cocunut Juice", "Coconut Milk", "Cranberry Juice", "Cranberry Blueberry Juice", "Cranberry Pomegranate Juice", "Cranberry Raspberry Juice", "Cucumber Juice", "Energy Drink", "Fruit Punch", "Gin", "Grape (Concord) Juice", "Grape (White) Juice", "Grapefruit (Pink) Juice", "Grapefruit (White) Juice", "Kiwi Strawberry Juice", "Kool-Aid", "Lemonade", "Lemon Juice", "Limeade", "Lime Juice", "Liqueur (Amaretto)", "Liqueur (Kahlua)", "Liqueur (Vermouth)", "Liqueur (Irish Cream)", "Liqueur (Marachino)", "Liqueur (Orange)", "Mango Juice", "Milk", "Nectarine Juice", "Orange Juice", "Orange Liqueur", "Papaya Juice", "Pear Juice", "Pineapple Juice", "Plum Juice", "Pomegranate Juice", "Prune Juice", "Razzleberry Juice", "Rum", "Sweet Tea", "Tangerine Juice", "Tea", "Tequila", "Tomato Juice", "Vegetable Juice", "Vermouth", "Vodka", "Watermelon Lemonade", "Whiskey (Bourbon)", "Whiskey (Canadian)", "Whiskey (Irish)", "Whiskey (Japanese)", "Whiskey (ManX)", "Whiskey (Rye)", "Whiskey (Scotch)", "Whiskey (Tennessee)", "Wine (Red)", "Wine (Rose)", "Wine (Sparkling)", "Wine (White)" }));

        bottle6Combo.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottle6Combo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Apple Cider", "Apple Juice", "Apple Spiced Cider", "Apricot Juice", "Black Cherry Juice", "Blackberry Juice", "Blueberry Juice", "Blueberry Pomegranate", "Brandy (Armagnac)", "Brandy (Cognac)", "Brandy (Fruit)", "Boysenberry Juice", "Carrot Juice", "Celery Juice", "Cherry Juice", "Cocunut Juice", "Coconut Milk", "Cranberry Juice", "Cranberry Blueberry Juice", "Cranberry Pomegranate Juice", "Cranberry Raspberry Juice", "Cucumber Juice", "Energy Drink", "Fruit Punch", "Gin", "Grape (Concord) Juice", "Grape (White) Juice", "Grapefruit (Pink) Juice", "Grapefruit (White) Juice", "Kiwi Strawberry Juice", "Kool-Aid", "Lemonade", "Lemon Juice", "Limeade", "Lime Juice", "Liqueur (Amaretto)", "Liqueur (Kahlua)", "Liqueur (Vermouth)", "Liqueur (Irish Cream)", "Liqueur (Marachino)", "Liqueur (Orange)", "Mango Juice", "Milk", "Nectarine Juice", "Orange Juice", "Orange Liqueur", "Papaya Juice", "Pear Juice", "Pineapple Juice", "Plum Juice", "Pomegranate Juice", "Prune Juice", "Razzleberry Juice", "Rum", "Sweet Tea", "Tangerine Juice", "Tea", "Tequila", "Tomato Juice", "Vegetable Juice", "Vermouth", "Vodka", "Watermelon Lemonade", "Whiskey (Bourbon)", "Whiskey (Canadian)", "Whiskey (Irish)", "Whiskey (Japanese)", "Whiskey (ManX)", "Whiskey (Rye)", "Whiskey (Scotch)", "Whiskey (Tennessee)", "Wine (Red)", "Wine (Rose)", "Wine (Sparkling)", "Wine (White)" }));

        bottle5Combo.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottle5Combo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Apple Cider", "Apple Juice", "Apple Spiced Cider", "Apricot Juice", "Black Cherry Juice", "Blackberry Juice", "Blueberry Juice", "Blueberry Pomegranate", "Brandy (Armagnac)", "Brandy (Cognac)", "Brandy (Fruit)", "Boysenberry Juice", "Carrot Juice", "Celery Juice", "Cherry Juice", "Cocunut Juice", "Coconut Milk", "Cranberry Juice", "Cranberry Blueberry Juice", "Cranberry Pomegranate Juice", "Cranberry Raspberry Juice", "Cucumber Juice", "Energy Drink", "Fruit Punch", "Gin", "Grape (Concord) Juice", "Grape (White) Juice", "Grapefruit (Pink) Juice", "Grapefruit (White) Juice", "Kiwi Strawberry Juice", "Kool-Aid", "Lemonade", "Lemon Juice", "Limeade", "Lime Juice", "Liqueur (Amaretto)", "Liqueur (Kahlua)", "Liqueur (Vermouth)", "Liqueur (Irish Cream)", "Liqueur (Marachino)", "Liqueur (Orange)", "Mango Juice", "Milk", "Nectarine Juice", "Orange Juice", "Orange Liqueur", "Papaya Juice", "Pear Juice", "Pineapple Juice", "Plum Juice", "Pomegranate Juice", "Prune Juice", "Razzleberry Juice", "Rum", "Sweet Tea", "Tangerine Juice", "Tea", "Tequila", "Tomato Juice", "Vegetable Juice", "Vermouth", "Vodka", "Watermelon Lemonade", "Whiskey (Bourbon)", "Whiskey (Canadian)", "Whiskey (Irish)", "Whiskey (Japanese)", "Whiskey (ManX)", "Whiskey (Rye)", "Whiskey (Scotch)", "Whiskey (Tennessee)", "Wine (Red)", "Wine (Rose)", "Wine (Sparkling)", "Wine (White)" }));

        bottleloaderConfirm.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottleloaderConfirm.setText("Confirm");

        bottleloaderCancel.setFont(new java.awt.Font("Ubuntu Medium", 0, 12)); // NOI18N
        bottleloaderCancel.setText("Cancel");

        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()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(bottle1Label)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(bottle1Combo, 0, 227, Short.MAX_VALUE))
                    .add(layout.createSequentialGroup()
                        .add(bottle2Label)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(bottle2Combo, 0, 227, Short.MAX_VALUE))
                    .add(layout.createSequentialGroup()
                        .add(bottle3Label)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(bottle3Combo, 0, 227, Short.MAX_VALUE))
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(bottle4Label)
                            .add(bottle5Label)
                            .add(bottle6Label))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, bottle6Combo, 0, 227, Short.MAX_VALUE)
                            .add(bottle5Combo, 0, 227, Short.MAX_VALUE)
                            .add(bottle4Combo, 0, 227, Short.MAX_VALUE)))
                    .add(layout.createSequentialGroup()
                        .add(bottleloaderConfirm, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 145, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(bottleloaderCancel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(layout.createSequentialGroup()
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                    .add(layout.createSequentialGroup()
                                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                            .add(bottle1Label)
                                            .add(bottle1Combo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                        .add(33, 33, 33))
                                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                        .add(bottle2Combo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                        .add(bottle2Label)))
                                .add(33, 33, 33))
                            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                .add(bottle3Combo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(bottle3Label)))
                        .add(33, 33, 33))
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(bottle4Combo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(bottle4Label)))
                .add(6, 6, 6)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(bottle5Label)
                    .add(bottle5Combo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(bottle6Combo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(bottle6Label))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(bottleloaderConfirm, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                    .add(bottleloaderCancel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>

    /**
     * @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(BottleLoader.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(BottleLoader.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(BottleLoader.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(BottleLoader.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 BottleLoader().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify
    private javax.swing.JComboBox bottle1Combo;
    private javax.swing.JLabel bottle1Label;
    private javax.swing.JComboBox bottle2Combo;
    private javax.swing.JLabel bottle2Label;
    private javax.swing.JComboBox bottle3Combo;
    private javax.swing.JLabel bottle3Label;
    private javax.swing.JComboBox bottle4Combo;
    private javax.swing.JLabel bottle4Label;
    private javax.swing.JComboBox bottle5Combo;
    private javax.swing.JLabel bottle5Label;
    private javax.swing.JComboBox bottle6Combo;
    private javax.swing.JLabel bottle6Label;
    private javax.swing.JButton bottleloaderCancel;
    private javax.swing.JButton bottleloaderConfirm;
    // End of variables declaration
}

Was This Post Helpful? 0
  • +
  • -

#4 darek9576   User is offline

  • D.I.C Lover

Reputation: 204
  • View blog
  • Posts: 1,747
  • Joined: 13-March 10

Re: Opening another Jframe from an actionlister on one Jframe

Posted 18 April 2013 - 09:33 AM

Your code should work. Set a break point and step through your code.
Was This Post Helpful? 0
  • +
  • -

#5 BigD959919   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 26-March 12

Re: Opening another Jframe from an actionlister on one Jframe

Posted 18 April 2013 - 09:38 AM

ill try that now.
Was This Post Helpful? 0
  • +
  • -

#6 BigD959919   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 26-March 12

Re: Opening another Jframe from an actionlister on one Jframe

Posted 18 April 2013 - 09:50 AM

dont know why but it wont complie. does nothing when i hit run.
Was This Post Helpful? 0
  • +
  • -

#7 BigD959919   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 26-March 12

Re: Opening another Jframe from an actionlister on one Jframe

Posted 18 April 2013 - 10:06 AM

I am going to try avoiding opening another JFrame and go a different route. I had 3 people look at my code and it is right just wont compile for whatever reason.
Was This Post Helpful? 0
  • +
  • -

#8 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8381
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: Opening another Jframe from an actionlister on one Jframe

Posted 18 April 2013 - 11:31 AM

View Postdarek9576, on 18 April 2013 - 12:33 PM, said:

Your code should work. Set a break point and step through your code.

It does not compile, nothing to do with a run time error
Was This Post Helpful? 1
  • +
  • -

#9 darek9576   User is offline

  • D.I.C Lover

Reputation: 204
  • View blog
  • Posts: 1,747
  • Joined: 13-March 10

Re: Opening another Jframe from an actionlister on one Jframe

Posted 18 April 2013 - 12:56 PM

View Postpbl, on 18 April 2013 - 11:31 AM, said:

View Postdarek9576, on 18 April 2013 - 12:33 PM, said:

Your code should work. Set a break point and step through your code.

It does not compile, nothing to do with a run time error


True, my mistake.
Was This Post Helpful? 0
  • +
  • -

#10 farrell2k   User is offline

  • D.I.C Lover
  • member icon

Reputation: 874
  • View blog
  • Posts: 2,706
  • Joined: 29-July 11

Re: Opening another Jframe from an actionlister on one Jframe

Posted 18 April 2013 - 04:08 PM

My money is on it not compiling is because of that org.jdesktop.Grouplayout crap. Use the regular Java GroupLayout. Right click on the form in the designer -> set layout -> group layout.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1