String currentLookAndFeel= UIManager.getSystemLookAndFeelClassName();
        try {
            UIManager.setLookAndFeel(currentLookAndFeel);
        }
        catch (Exception exc)
        {
            System.err.println("Error loading " + currentLookAndFeel + ": " + exc);
        }

解决方案 »

  1.   

    应该就是界面风格的问题,如楼上在main()函数入口处添上以上代码即可,注意一定要捕捉异常
    如:
    try {
          UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
          LogonFrame lf = new LogonFrame();
          lf.show();
        }
        catch(Exception e) {
          System.out.println("error alpha:"+e);
        }如果这样你还对字体不够满意,那么就使用控件的setFont方法来设置字体吧
      

  2.   

    在main()中加入:
               Font font = new Font("隶书",Font.PLAIN,15);
               UIManager.put("Button.font",font);
      UIManager.put("ToggleButton.font",font);
      UIManager.put("RadioButton.font",font);
      UIManager.put("CheckBox.font",font);
      UIManager.put("ColorChooser.font",font);
      UIManager.put("ToggleButton.font",font);
      UIManager.put("ComboBox.font",font);
      UIManager.put("ComboBoxItem.font",font);
      UIManager.put("InternalFrame.titleFont",font);
      UIManager.put("Label.font",font);
      UIManager.put("List.font",font);
      UIManager.put("MenuBar.font",font);
      UIManager.put("Menu.font",font);
      UIManager.put("MenuItem.font",font);
      UIManager.put("RadioButtonMenuItem.font",font);
      UIManager.put("CheckBoxMenuItem.font",font);
      UIManager.put("PopupMenu.font",font);
      UIManager.put("OptionPane.font",font);
      UIManager.put("Panel.font",font);
      UIManager.put("ProgressBar.font",font);
      UIManager.put("ScrollPane.font",font);
      UIManager.put("Viewport",font);
      UIManager.put("TabbedPane.font",font);
      UIManager.put("TableHeader.font",font);
      UIManager.put("TextField.font",font);
      UIManager.put("PasswordFiled.font",font);
      UIManager.put("TextArea.font",font);
      UIManager.put("TextPane.font",font);
      UIManager.put("EditorPane.font",font);
      UIManager.put("TitledBorder.font",font);
      UIManager.put("ToolBar.font",font);
      UIManager.put("ToolTip.font",font);
      UIManager.put("Tree.font",font);
      

  3.   

    可我的Dialog里面的内容怎么改变字体?只有按钮和表头改变字体了