// Java setting icon
Imageicon icon = new imageicon ("icon.png"); // It is placed under the root directory, Src's parent directory
Frame. seticonimage (icon. getimage ());
// Set the interface style in Java
Throws excption must throw an exception
Javax. Swing. uimanager. setlookandfeel (javax. Swing. uimanager. getsystemlookandfeelclassname ());
Use the interface style of the current system. Place the statement before the initialization object.
// Set the font in Java
TXT. setfont (new font ("sansserif", 0, 15 ));
The first parameter is the font name, the second parameter (0 normal, 1 bold, 2 italic), and the third parameter is the font size.
Setfont seems to be only valid for controls, and invalid for jframe and jpanel
// The jtable header is displayed and cannot be edited.
Tablemodel = new defaulttablemodel (tableinfostrings, tablename );
Studentable = new jtable (tablemodel) {public Boolean iscelleditable (INT row, int column) {return false ;}}; // The set text cannot be modified.
Jscrollpane = new jscrollpane (studentable );
/*
* *****
* ***** 2013.6.30
* Http://blog.csdn.net/xyydyyqf
*/