0

I would like to load the form DataEntry from the main class.. I'm a newbie to Java, any help would be appreciated.

public class Main extends javax.swing.JFrame{

  /**
   * @param args the command line arguments
   */
  public static void main(String[] args) {
    DataEntry dbJframe = new DataEntry();
    DbConnect connect = new DbConnect();
    connect.getData();
m59
  • 43,214
  • 14
  • 119
  • 136
Nasir Shiraz
  • 161
  • 1
  • 3
  • 15
  • 1
    1) *"..form DataEntry"* What `DataEntry` form? For better help sooner, post an [SSCCE](http://sscce.org/). 2) Please *read* the helpful tag pop-ups before slapping them on your question. This has ***nothing*** to do with HTML forms. – Andrew Thompson Dec 13 '13 at 18:54
  • DataEntry is a Jframe form , i basically want it to load from Main class. thanks – Nasir Shiraz Dec 13 '13 at 18:56
  • *"DataEntry is a Jframe form"* 1) Again, a little louder this time.. ***For better help sooner, post an [SSCCE](http://sscce.org/).*** 2) See [The Use of Multiple JFrames, Good/Bad Practice?](http://stackoverflow.com/a/9554657/418556) The 2nd 'frame' should probably be a `JDialog`. – Andrew Thompson Dec 13 '13 at 18:57

1 Answers1

1

Try calling

dbJframe.setVisible(true);

Seems that's what you need.

peter.petrov
  • 38,363
  • 16
  • 94
  • 159