how to make standalone code out of NetBeans IDE

Reply

Join Date: Jun 2007
Posts: 8
Reputation: dajiebuda is an unknown quantity at this point 
Solved Threads: 0
dajiebuda dajiebuda is offline Offline
Newbie Poster

how to make standalone code out of NetBeans IDE

 
0
  #1
Jun 17th, 2007
I copy and paste code generated from NetBeans into a java file. To run it, I got message "package org.jdesktop.layout does not exit"

What should I do?
Thanks ahead.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 83
Reputation: ProgrammersTalk is an unknown quantity at this point 
Solved Threads: 7
ProgrammersTalk's Avatar
ProgrammersTalk ProgrammersTalk is offline Offline
Junior Poster in Training

Re: how to make standalone code out of NetBeans IDE

 
0
  #2
Jun 17th, 2007
can you share your code please?
well, even without looking at your code, it seems that you're just trying to access package that's not there.. so i guess you need to either create that package.. or... delete that line (in the beginning of the codes)
Last edited by ProgrammersTalk; Jun 17th, 2007 at 11:07 pm.
The ProgrammersTalk Community | Programming & Marketing | Buying & Selling Script
Hang out place of novice and intermediate programmers
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 8
Reputation: dajiebuda is an unknown quantity at this point 
Solved Threads: 0
dajiebuda dajiebuda is offline Offline
Newbie Poster

Re: how to make standalone code out of NetBeans IDE

 
0
  #3
Jun 18th, 2007
Here is the code. It works within netBeans. If I run it in the command window with javac, I get message "package org.jdesktop.layout does not exist"


public class report2 extends javax.swing.JFrame {

/** Creates new form report2 */
public report2() {
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.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
displayDrawing = new javax.swing.JPanel();
infoOutput = new javax.swing.JPanel();
triggerMatrix = new javax.swing.JToggleButton();
triggerInclusion = new javax.swing.JToggleButton();
startCalculation = new javax.swing.JToggleButton();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenu2 = new javax.swing.JMenu();
jMenu3 = new javax.swing.JMenu();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("AvantFGM");
displayDrawing.setBackground(new java.awt.Color(51, 51, 51));
org.jdesktop.layout.GroupLayout displayDrawingLayout = new org.jdesktop.layout.GroupLayout(displayDrawing);
displayDrawing.setLayout(displayDrawingLayout);
displayDrawingLayout.setHorizontalGroup(
displayDrawingLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 351, Short.MAX_VALUE)
);
displayDrawingLayout.setVerticalGroup(
displayDrawingLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 279, Short.MAX_VALUE)
);

infoOutput.setBackground(new java.awt.Color(255, 255, 255));
infoOutput.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.MatteBorder(null), "Info & Output"));
org.jdesktop.layout.GroupLayout infoOutputLayout = new org.jdesktop.layout.GroupLayout(infoOutput);
infoOutput.setLayout(infoOutputLayout);
infoOutputLayout.setHorizontalGroup(
infoOutputLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 86, Short.MAX_VALUE)
);
infoOutputLayout.setVerticalGroup(
infoOutputLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 128, Short.MAX_VALUE)
);

triggerMatrix.setText("Matrix");
triggerMatrix.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
triggerMatrixActionPerformed(evt);
}
});

triggerInclusion.setText("Inclusion");
triggerInclusion.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
triggerInclusionActionPerformed(evt);
}
});

startCalculation.setText("Calculate");
startCalculation.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
startCalculationActionPerformed(evt);
}
});

jMenu1.setText("File");
jMenuBar1.add(jMenu1);

jMenu2.setText("Option");
jMenuBar1.add(jMenu2);

jMenu3.setText("Help");
jMenuBar1.add(jMenu3);

setJMenuBar(jMenuBar1);

org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(displayDrawing, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
.add(triggerMatrix, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(infoOutput, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(triggerInclusion, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(startCalculation, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(triggerMatrix, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(triggerInclusion, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(startCalculation, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(infoOutput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(displayDrawing, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
pack();
}// </editor-fold>

private void startCalculationActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}

private void triggerInclusionActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}

private void triggerMatrixActionPerformed(java.awt.event.ActionEvent evt) {
// report2_2();
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new report2().setVisible(true);
}
});
}

// Variables declaration - do not modify
private javax.swing.JPanel displayDrawing;
private javax.swing.JPanel infoOutput;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenu jMenu3;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JToggleButton startCalculation;
private javax.swing.JToggleButton triggerInclusion;
private javax.swing.JToggleButton triggerMatrix;
// End of variables declaration

}
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,190
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 483
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: how to make standalone code out of NetBeans IDE

 
0
  #4
Jun 18th, 2007
dajiebuda do not do double posting! Stick to the original post and do not spread chaos over forum. I told you where you can find information to setup CLASSPATH and you should follow them. Why? Because if the not let you have NetBeans you would not know how to run simple Hello.java program from command line...
Copy and Pate is not solution to learn programming language
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC