这可能要计算一下吧,首先获得相对坐标,在获得frame的location然后通过换算就能得到了吧。

解决方案 »

  1.   

    look&feel 只能整体设置,不能对单个控件设置的setUI 函数,只是设置 控件在屏幕上的显示内容的,不是设置控件的 look&feel 的一个简单的 look&feel 设置代码: 放在 主窗体的构造函数中就可以了
    try {
    //UIManager.setLookAndFeel("net.beeger.squareness.SquarenessLookAndFeel");
    UIManager.setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel");
    //UIManager.setLookAndFeel("com.stefankrause.xplookandfeel.XPLookAndFeel");
    //UIManager.setLookAndFeel("com.incors.plaf.kunststoff.KunststoffLookAndFeel");
    SwingUtilities.updateComponentTreeUI(this);            
    } catch (Exception ex) {
    ex.printStackTrace();
    }