java UIManager
UIManager.setLookAndFeel(“
com.sun.java.swing.plaf.windows.WindowsLookAndFeel
”);//windows默认
UIManager.put("MenuBar.font", font);//给控件设置字体
static Object
put
(Object
key, Object
value)
public static void setLookAndFeel(String className, java.awt.Component c) {
try {
UIManager.setLookAndFeel(className);
SwingUtilities.updateComponentTreeUI(c);//注意这行
}
catch (Exception ex) {
ex.printStackTrace();
JOptionPane.showMessageDialog(null,
"不好意思,setLookAndFeel时出错了:( Errormsg:" + ex,
"setLookAndFeel",
JOptionPane.INFORMATION_MESSAGE);
}
相关文档:
每个Java应用都可以有自己的安全管理器,它是防范恶意攻击的主要安全卫士。安全管理器通过执行运行阶段检查和访问授权,以实施应用所需的安全策略,从而保护资源免受恶意操作的攻击。实际上,安全管理器根据Java安全策略文件决定将哪组权限授予类。然而,当不可信的类和第三方应用使用JVM时,Java安全管 ......
1.java过滤器对ext异步请求跳转
用户访问超时
解决两种情况下的用户访问超时。
a)普通http请求的session超时。
b)异步http请求的session超时,使用ext后大部分的界面刷新都是异步的ajax请求。
不管是那种类型的http请求总是可以由一个过滤器来捕捉。
分类:普通http请求的header参数中没有x-requested-with: ......
1.创建文件夹
File myFolderPath = new File(%%1);
try {
if (!myFolderPath.exists()) {
myFolderPath.mkdir();
}
}
catch (Exception e) {
System.out.println("新建目录操作出错");
e.printStackTrace();  ......
//java解析.mdb文件的表名集合
this.tableList.clear();
conn = null;
st = null;
rs = null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url ="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ="+dbName;// ......
public class Test {
public static void main(String args[]){
try{
// 获取键盘输入的字符串
BufferReader f = new BufferReader(new inputStreamReader(System.in));
String str = f.readline();
for (int i = str.length() -1 ; i >=0 ; i--) {
System.out.print(CharAt(i)); ......