posts - 41,  comments - 77,  trackbacks - 0
原来弄过QuaQua的东西,但是一直不能把JFrame和JDialog变成Ox mac的样式
原因是,如果系统并不是苹果的系统就需要显示的加载JFrame和JDialog的样式



System.setProperty("Quaqua.tabLayoutPolicy","wrap");
          
        
if(!System.getProperty("os.name").toLowerCase().startsWith("mac"))
        
{
            
try
            
{
                Methods.invokeStatic(JFrame.
class"setDefaultLookAndFeelDecorated", Boolean.TYPE, Boolean.TRUE);
                Methods.invokeStatic(JDialog.
class"setDefaultLookAndFeelDecorated", Boolean.TYPE, Boolean.TRUE);
            }

            
catch(NoSuchMethodException e)
            
{
                e.printStackTrace();
            }

        }

        
try 
        
{
            UIManager.setLookAndFeel(
"ch.randelshofer.quaqua.QuaquaLookAndFeel");
        }
 
        
catch(Exception e){}
posted on 2008-01-26 13:01 Dong 阅读(1745) 评论(6)  编辑  收藏

专题:Android  iPad  jQuery  Chrome OS

博客园首页  IT新闻  知识库  学英语  Java程序员招聘
标题  
姓名  
主页
验证码 *  
内容(请不要发表任何与政治相关的内容)  
  登录      
每天10分钟,轻松学英语


网站导航: