Results 1 to 11 of 11
  1. #1
    kevN is offline Member
    Join Date
    Aug 2008
    Posts
    6
    Rep Power
    0

    Unhappy Help!urgently please

    I have a project in Netbeans.When compiled it has no error at all,bt once I run it nothing appears on the screen(none of the swing components appears!):confused:

  2. #2
    Gudradain is offline Member
    Join Date
    Nov 2008
    Posts
    44
    Rep Power
    0

    Default

    Wow. I don't it's possible to understand your problem with the few information you gave us.

    SSCCE : Java Glossary

    Try the link :)

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default

    In addition to the link provided by Gudradain:
    How To Ask Questions The Smart Way

    db

  4. #4
    kevN is offline Member
    Join Date
    Aug 2008
    Posts
    6
    Rep Power
    0

    Default

    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

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    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.

  6. #6
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    8

    Default 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.

    Java Code:
    final CarInterface carInterface= new CarInterface(new DatabaseManager());
    EventQueue.invokeLater(new Runnable() {
      public void run() {
        carInterface.setVisible(true);
      }
    });
    As it is, your () don't add up.

    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.

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    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.

  8. #8
    kevN is offline Member
    Join Date
    Aug 2008
    Posts
    6
    Rep Power
    0

    Default

    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..

  9. #9
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    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.

  10. #10
    kevN is offline Member
    Join Date
    Aug 2008
    Posts
    6
    Rep Power
    0

    Default

    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



    }

  11. #11
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. Help needed, urgently!
    By Emfy in forum New To Java
    Replies: 5
    Last Post: 12-27-2008, 04:06 PM
  2. Replies: 0
    Last Post: 03-12-2008, 03:23 PM
  3. please help urgently
    By ananas7777 in forum New To Java
    Replies: 1
    Last Post: 12-22-2007, 03:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •