what is the difference between JFrame and FramView in Java?
1- what is the difference between JFrame and FramView in Java ??
2- when I create New Desktop Application with NetBeans , FrameView is created and when I put any component on it ( by design mode) it appe开发者_运维问答ars beautiful like this ( see picture 1 in bottom link )
but when Application run , it appears like this !!(see picture 2 in bottom link )
and when I create JFram and put a button on it , whenever Application run the button appears like this ... !! (see picture 3 in bottom link )
why this happend ..?? I want to create a beautiful interface and component Like component on FramView but without any problem in design? How I do that ??
Notice : I use NetBeans 6.8
see pictures http://www.freeimagehosting.net/uploads/fc54702761.png
I am sorry because I put the Images in this way , but your web site prevent me from putting image and multi hyperlinks because I am a new user
If memory serves me right, the FrameView is a custom component by Netbeans. To make your JFrame components look "better", add the following code just before calling the init()
method:
import javax.swing.UIManager;
public class NewJFrame extends javax.swing.JFrame {
/** Creates new form NewJFrame */
public NewJFrame() {
try
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception e) { }
initComponents();
}
.
.
.
.
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame().setVisible(true);
}
});
}
精彩评论