Results 1 to 11 of 11
Thread: Help!urgently please
- 01-05-2009, 12:17 PM #1
Member
- Join Date
- Aug 2008
- Posts
- 6
- Rep Power
- 0
- 01-05-2009, 12:48 PM #2
Member
- Join Date
- Nov 2008
- Posts
- 42
- Rep Power
- 0
Wow. I don't it's possible to understand your problem with the few information you gave us.
SSCCE : Java Glossary
Try the link :)
- 01-05-2009, 12:53 PM #3
In addition to the link provided by Gudradain:
How To Ask Questions The Smart Way
db
- 01-05-2009, 02:07 PM #4
Member
- Join Date
- Aug 2008
- Posts
- 6
- Rep Power
- 0
ok. This code doesnot generate anything on the screen when it is executed:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package interfaces;
import allClasses.Car;
import allClasses.Customer;
import allClasses.DatabaseManager;
import com.michaelbaranov.microba.calendar.DatePicker;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
/**
*
* @author user
*/
public class CarInterface extends javax.swing.JInternalFrame implements ActionListener {
/*
* Car.java
*
* Created on March 27, 2008, 4:21 PM
*/
private DatabaseManager dbManager;
// Variables declaration - do not modify
private javax.swing.JButton btnCancel;
private javax.swing.JButton btnClear;
private javax.swing.JButton btnSave;
private javax.swing.JPanel jPaneldetails;
private javax.swing.JPanel jPaneloperations;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JLabel lblcustid;
private javax.swing.JLabel lbldate;
private javax.swing.JLabel lbldescription;
private javax.swing.JLabel lblmodel;
private javax.swing.JLabel lblregno;
private javax.swing.JTextField txtcustid;
private javax.swing.JTextArea txtdescription;
private javax.swing.JTextField txtmodel;
private DatePicker txtparkingdate;
private javax.swing.JTextField txtregno;
// End of variables declaration
public CarInterface (DatabaseManager dbMan)
{
super("New Car Registration",true,true,true,true);
dbManager=dbMan;
initComponents();
Toolkit kit=Toolkit.getDefaultToolkit();
Dimension dim=kit.getScreenSize();
int sWidth=(int)dim.getWidth();
int sHeight=(int)dim.getHeight();
int wWidth=this.getWidth();
int wHeight=this.getHeight();
setLocation((sWidth-wWidth)/2,(sHeight-wHeight)/2-80);
setVisible(true);
}
public void ActionPerformed(ActionEvent event)
{
if(event.getSource()==btnSave)
{
saveDetails();
JOptionPane.showMessageDialog(CarInterface.this,"S aved successfully","Info",JOptionPane.INFORMATION_MESSA GE);
clearFields();
}
else if(event.getSource()==btnClear)
{
JOptionPane.showMessageDialog(CarInterface.this,"A re you sure?","Info",JOptionPane.QUESTION_MESSAGE);
clearFields();
}
else if (event.getSource()==btnCancel)
{
this.dispose();
}
}
public void clearFields()
{
txtcustid.setText("");
txtdescription.setText("");
//txtparkingdate.setDate("");
txtmodel.setText("");
txtregno.setText("");
}
public void saveDetails()
{
String custid=txtcustid.getText();
String description=txtdescription.getText();
String parkingdate=txtparkingdate.getDate().toLocaleStrin g();
String model=txtmodel.getText();
String regno=txtregno.getText();
Car car=new Car();
car.setCustID(new Customer(custid));
car.setDescription(description);
car.setModel(model);
car.setParkingDate(parkingdate);
car.setRegNO(regno);
dbManager.insertObject(car);
}
private void initComponents() {
jPaneldetails = new javax.swing.JPanel();
lblregno = new javax.swing.JLabel();
lblmodel = new javax.swing.JLabel();
lbldescription = new javax.swing.JLabel();
lblcustid = new javax.swing.JLabel();
txtcustid = new javax.swing.JTextField();
txtregno = new javax.swing.JTextField();
txtmodel = new javax.swing.JTextField();
jScrollPane1 = new javax.swing.JScrollPane();
txtdescription = new javax.swing.JTextArea();
lbldate = new javax.swing.JLabel();
txtparkingdate = new DatePicker();
jPaneloperations = new javax.swing.JPanel();
btnSave = new javax.swing.JButton();
btnClear = new javax.swing.JButton();
btnCancel = new javax.swing.JButton();
btnCancel.addActionListener(this);
btnClear.addActionListener(this);
btnSave.addActionListener(this);
jPaneldetails.setBorder(javax.swing.BorderFactory. createTitledBorder("car details"));
lblregno.setText("Regno");
lblmodel.setText("Model");
lbldescription.setText("Description");
lblcustid.setText("Custid");
txtdescription.setColumns(20);
txtdescription.setRows(5);
jScrollPane1.setViewportView(txtdescription);
lbldate.setText("parkingdate");
javax.swing.GroupLayout jPaneldetailsLayout = new javax.swing.GroupLayout(jPaneldetails);
jPaneldetails.setLayout(jPaneldetailsLayout);
jPaneldetailsLayout.setHorizontalGroup(
jPaneldetailsLayout.createParallelGroup(javax.swin g.GroupLayout.Alignment.LEADING)
.addGroup(jPaneldetailsLayout.createSequentialGrou p()
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPaneldetailsLayout.createSequentialGrou p()
.addComponent(lbldescription, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Component Placement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPaneldetailsLayout.createSequentialGrou p()
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(javax.swing.GroupLayout.Alignment.LEADIN G, jPaneldetailsLayout.createSequentialGroup()
.addComponent(lblmodel)
.addGap(18, 18, 18)
.addComponent(txtmodel, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.LEADIN G, jPaneldetailsLayout.createSequentialGroup()
.addComponent(lblregno)
.addGap(18, 18, 18)
.addComponent(txtregno)))
.addGap(31, 31, 31)
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lblcustid)
.addComponent(lbldate))))
.addPreferredGap(javax.swing.LayoutStyle.Component Placement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(txtparkingdate)
.addComponent(txtcustid, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE)))
);
jPaneldetailsLayout.setVerticalGroup(
jPaneldetailsLayout.createParallelGroup(javax.swin g.GroupLayout.Alignment.LEADING)
.addGroup(jPaneldetailsLayout.createSequentialGrou p()
.addContainerGap()
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lblregno)
.addComponent(txtregno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblcustid)
.addComponent(txtcustid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(12, 12, 12)
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lblmodel)
.addComponent(txtmodel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lbldate)
.addComponent(txtparkingdate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPaneldetailsLayout.createSequentialGrou p()
.addPreferredGap(javax.swing.LayoutStyle.Component Placement.RELATED, 26, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(jPaneldetailsLayout.createSequentialGrou p()
.addGap(18, 18, 18)
.addComponent(lbldescription)
.addContainerGap())))
);
jPaneloperations.setBorder(javax.swing.BorderFacto ry.createTitledBorder("operations"));
btnSave.setText("Save");
btnClear.setText("Clear");
btnCancel.setText("Cancel");
javax.swing.GroupLayout jPaneloperationsLayout = new javax.swing.GroupLayout(jPaneloperations);
jPaneloperations.setLayout(jPaneloperationsLayout) ;
jPaneloperationsLayout.setHorizontalGroup(
jPaneloperationsLayout.createParallelGroup(javax.s wing.GroupLayout.Alignment.LEADING)
.addGroup(jPaneloperationsLayout.createSequentialG roup()
.addGap(23, 23, 23)
.addComponent(btnSave)
.addGap(45, 45, 45)
.addComponent(btnClear)
.addGap(46, 46, 46)
.addComponent(btnCancel)
.addContainerGap(43, Short.MAX_VALUE))
);
jPaneloperationsLayout.setVerticalGroup(
jPaneloperationsLayout.createParallelGroup(javax.s wing.GroupLayout.Alignment.LEADING)
.addGroup(jPaneloperationsLayout.createSequentialG roup()
.addGroup(jPaneloperationsLayout.createParallelGro up(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnClear)
.addComponent(btnSave)
.addComponent(btnCancel))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_S IZE, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout .Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.G roupLayout.Alignment.LEADING)
.addComponent(jPaneldetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPaneloperations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(16, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout .Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(16, 16, 16)
.addComponent(jPaneldetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Component Placement.UNRELATED)
.addComponent(jPaneloperations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(13, Short.MAX_VALUE))
);
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 CarInterface(new DatabaseManager()).setVisible(true);
}
});
}*/
public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("Not supported yet.");
}
// Variables declaration - do not modify
// End of variables declaration
}
thanks guys
- 01-05-2009, 03:46 PM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Can you run this code on NetBeans? I mean you click Shift+F6 to run, and what happen at that time? Is that NetBeans complain on something? Seems to me you have comment the main method. So how can you run this simple Java code. This is not an Applet.
- 01-05-2009, 08:46 PM #6
Bit of a mess
Eranga is right in saying you commented out your main(). Nothing will run if you do that.
Your code is dense, which I think is causing some of your problems. Spread it out a bit.
As it is, your () don't add up.Java Code:final CarInterface carInterface= new CarInterface(new DatabaseManager()); EventQueue.invokeLater(new Runnable() { public void run() { carInterface.setVisible(true); } });
Also, CarInterface must be some sort of Swing window, like JFrame. I didn't look through your code enough to verify that.
Last, create several classes to group your code: MVC = Model for all the business logic, such as database access, View for your GUI, based on a JFrame, Controller for the program logic. The View should be very simple and do nothing but display controls.
- 01-06-2009, 04:07 AM #7
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Start from the simple thing first. Read clearly all messages you comes with run-time and compile-time. Specially NetBeans state those things more clearly.
- 01-07-2009, 01:15 PM #8
Member
- Join Date
- Aug 2008
- Posts
- 6
- Rep Power
- 0
Sorry guys.I did not want to put all the details on this page because the project involves Database connection and other modules. it looks like I will have to do that if I have to be helped..
- 01-07-2009, 01:19 PM #9
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
You don't, of course, have to include the server name/ip or port, or user, or password, but the rest of the information is necessary. You may, if you wish, anonymise your DB table info (i.e. table and column names) with TABLE01, TABLE02, COL01, COL02, or whatever, but, otherwise, any actual queries, and the way in which you open and use connections, is needed, if that is related to your problem.
- 01-09-2009, 02:40 PM #10
Member
- Join Date
- Aug 2008
- Posts
- 6
- Rep Power
- 0
here comes one that makes enough sense guys,although the internal frame does not appear on the screen:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package interfaces;
import allClasses.Car;
import allClasses.Customer;
import allClasses.DatabaseManager;
import com.michaelbaranov.microba.calendar.DatePicker;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
/**
*
* @author user
*/
public class CarInterface extends javax.swing.JInternalFrame implements ActionListener {
/*
* Car.java
*
* Created on March 27, 2008, 4:21 PM
*/
private DatabaseManager dbManager;
// Variables declaration - do not modify
private javax.swing.JButton btnCancel;
private javax.swing.JButton btnClear;
private javax.swing.JButton btnSave;
private javax.swing.JPanel jPaneldetails;
private javax.swing.JPanel jPaneloperations;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JLabel lblcustid;
private javax.swing.JLabel lbldate;
private javax.swing.JLabel lbldescription;
private javax.swing.JLabel lblmodel;
private javax.swing.JLabel lblregno;
private javax.swing.JTextField txtcustid;
private javax.swing.JTextArea txtdescription;
private javax.swing.JTextField txtmodel;
private DatePicker txtparkingdate;
private javax.swing.JTextField txtregno;
// End of variables declaration
public CarInterface ()
{
super("New Car Registration",true,true,true,true);
//dbManager=dbMan;
initComponents();
Toolkit kit=Toolkit.getDefaultToolkit();
Dimension dim=kit.getScreenSize();
int sWidth=(int)dim.getWidth();
int sHeight=(int)dim.getHeight();
int wWidth=this.getWidth();
int wHeight=this.getHeight();
setLocation((sWidth-wWidth)/2,(sHeight-wHeight)/2-80);
setVisible(true);
}
public void ActionPerformed(ActionEvent event)
{
if(event.getSource()==btnSave)
{
saveDetails();
JOptionPane.showMessageDialog(CarInterface.this,"S aved successfully","Info",JOptionPane.INFORMATION_MESSA GE);
clearFields();
}
else if(event.getSource()==btnClear)
{
JOptionPane.showMessageDialog(CarInterface.this,"A re you sure?","Info",JOptionPane.QUESTION_MESSAGE);
clearFields();
}
else if (event.getSource()==btnCancel)
{
this.dispose();
}
}
public void clearFields()
{
txtcustid.setText("");
txtdescription.setText("");
//txtparkingdate.setDate("");
txtmodel.setText("");
txtregno.setText("");
}
public void saveDetails()
{
String custid=txtcustid.getText();
String description=txtdescription.getText();
String parkingdate=txtparkingdate.getDate().toLocaleStrin g();
String model=txtmodel.getText();
String regno=txtregno.getText();
Car car=new Car();
car.setCustID(new Customer(custid));
car.setDescription(description);
car.setModel(model);
car.setParkingDate(parkingdate);
car.setRegNO(regno);
dbManager.insertObject(car);
}
private void initComponents() {
jPaneldetails = new javax.swing.JPanel();
lblregno = new javax.swing.JLabel();
lblmodel = new javax.swing.JLabel();
lbldescription = new javax.swing.JLabel();
lblcustid = new javax.swing.JLabel();
txtcustid = new javax.swing.JTextField();
txtregno = new javax.swing.JTextField();
txtmodel = new javax.swing.JTextField();
jScrollPane1 = new javax.swing.JScrollPane();
txtdescription = new javax.swing.JTextArea();
lbldate = new javax.swing.JLabel();
txtparkingdate = new DatePicker();
jPaneloperations = new javax.swing.JPanel();
btnSave = new javax.swing.JButton();
btnClear = new javax.swing.JButton();
btnCancel = new javax.swing.JButton();
btnCancel.addActionListener(this);
btnClear.addActionListener(this);
btnSave.addActionListener(this);
jPaneldetails.setBorder(javax.swing.BorderFactory. createTitledBorder("car details"));
lblregno.setText("Regno");
lblmodel.setText("Model");
lbldescription.setText("Description");
lblcustid.setText("Custid");
txtdescription.setColumns(20);
txtdescription.setRows(5);
jScrollPane1.setViewportView(txtdescription);
lbldate.setText("parkingdate");
javax.swing.GroupLayout jPaneldetailsLayout = new javax.swing.GroupLayout(jPaneldetails);
jPaneldetails.setLayout(jPaneldetailsLayout);
jPaneldetailsLayout.setHorizontalGroup(
jPaneldetailsLayout.createParallelGroup(javax.swin g.GroupLayout.Alignment.LEADING)
.addGroup(jPaneldetailsLayout.createSequentialGrou p()
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPaneldetailsLayout.createSequentialGrou p()
.addComponent(lbldescription, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Component Placement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPaneldetailsLayout.createSequentialGrou p()
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(javax.swing.GroupLayout.Alignment.LEADIN G, jPaneldetailsLayout.createSequentialGroup()
.addComponent(lblmodel)
.addGap(18, 18, 18)
.addComponent(txtmodel, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.LEADIN G, jPaneldetailsLayout.createSequentialGroup()
.addComponent(lblregno)
.addGap(18, 18, 18)
.addComponent(txtregno)))
.addGap(31, 31, 31)
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lblcustid)
.addComponent(lbldate))))
.addPreferredGap(javax.swing.LayoutStyle.Component Placement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(txtparkingdate)
.addComponent(txtcustid, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE)))
);
jPaneldetailsLayout.setVerticalGroup(
jPaneldetailsLayout.createParallelGroup(javax.swin g.GroupLayout.Alignment.LEADING)
.addGroup(jPaneldetailsLayout.createSequentialGrou p()
.addContainerGap()
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lblregno)
.addComponent(txtregno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblcustid)
.addComponent(txtcustid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(12, 12, 12)
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lblmodel)
.addComponent(txtmodel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lbldate)
.addComponent(txtparkingdate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPaneldetailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPaneldetailsLayout.createSequentialGrou p()
.addPreferredGap(javax.swing.LayoutStyle.Component Placement.RELATED, 26, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(jPaneldetailsLayout.createSequentialGrou p()
.addGap(18, 18, 18)
.addComponent(lbldescription)
.addContainerGap())))
);
jPaneloperations.setBorder(javax.swing.BorderFacto ry.createTitledBorder("operations"));
btnSave.setText("Save");
btnClear.setText("Clear");
btnCancel.setText("Cancel");
javax.swing.GroupLayout jPaneloperationsLayout = new javax.swing.GroupLayout(jPaneloperations);
jPaneloperations.setLayout(jPaneloperationsLayout) ;
jPaneloperationsLayout.setHorizontalGroup(
jPaneloperationsLayout.createParallelGroup(javax.s wing.GroupLayout.Alignment.LEADING)
.addGroup(jPaneloperationsLayout.createSequentialG roup()
.addGap(23, 23, 23)
.addComponent(btnSave)
.addGap(45, 45, 45)
.addComponent(btnClear)
.addGap(46, 46, 46)
.addComponent(btnCancel)
.addContainerGap(43, Short.MAX_VALUE))
);
jPaneloperationsLayout.setVerticalGroup(
jPaneloperationsLayout.createParallelGroup(javax.s wing.GroupLayout.Alignment.LEADING)
.addGroup(jPaneloperationsLayout.createSequentialG roup()
.addGroup(jPaneloperationsLayout.createParallelGro up(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnClear)
.addComponent(btnSave)
.addComponent(btnCancel))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_S IZE, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout .Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.G roupLayout.Alignment.LEADING)
.addComponent(jPaneldetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPaneloperations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(16, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout .Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(16, 16, 16)
.addComponent(jPaneldetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.Component Placement.UNRELATED)
.addComponent(jPaneloperations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(13, Short.MAX_VALUE))
);
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 CarInterface();
//new DatabaseManager()).setVisible(true);
}
});
}
public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("Not supported yet.");
}
// Variables declaration - do not modify
// End of variables declaration
}
- 01-09-2009, 05:37 PM #11
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Please ask your question with the specific code segment. Go through such a long code is not an easy task to most of members.
Similar Threads
-
Help needed, urgently!
By Emfy in forum New To JavaReplies: 5Last Post: 12-27-2008, 03:06 PM -
Hibernate order by query thru java solution urgently reqd
By altaf in forum JDBCReplies: 0Last Post: 03-12-2008, 02:23 PM -
please help urgently
By ananas7777 in forum New To JavaReplies: 1Last Post: 12-22-2007, 02:48 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks