Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » WindowBuilder Can not render GUI (WindowBuilder Designer does not show GUI if I call two or more than two level methods)
icon4.gif  WindowBuilder Can not render GUI [message #1011863] Wed, 20 February 2013 06:46 Go to previous message
Sikandar Ali is currently offline Sikandar Ali
Messages: 3
Registered: February 2013
Junior Member
package com.swimap.omc.dcctool.view;

import java.awt.EventQueue;

public class MyFrame extends JFrame {

/**
*
*/
private static final long serialVersionUID = 1L;
private JPanel contentPane;

/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
MyFrame frame = new MyFrame();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}

/**
* Create the frame.
*/
public MyFrame() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
contentPane.setLayout(new GridBagLayout());

contentPane.add(getExpPathTf());

setContentPane(contentPane);
}

private JTextField getExpPathTf() {
JTextField exportPathTf = SwingUtil.createJTextField();
exportPathTf.setText("sikandar");
exportPathTf.setEditable(false);
return exportPathTf;
}

private static class SwingUtil {
public static JTextField createJTextField() {
JTextField tf = new JTextField();
tf.setBounds(10, 10, 100, 20);
return tf;
}
}

}
  • Attachment: MyFrame.java
    (Size: 1.39KB, Downloaded 30 times)
 
Read Message icon4.gif
Read Message
Read Message icon4.gif
Read Message
Previous Topic:Java IDE and WindowBuilder
Next Topic:JTable data display
Goto Forum:
  


Current Time: Sat May 25 17:40:50 EDT 2013

Powered by FUDForum. Page generated in 0.05267 seconds