JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Java SE 討論區 » Swing/AWT/SWT/JFace  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友   
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 JDK5.0 Swing 部分難字無法顯示,AWT可正常顯示
1976kevin





發文: 24
積分: 0
於 2008-05-09 19:48 user profilesend a private message to usersend email to 1976kevinreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
利用字霸造字有部分字型無法正常顯示,不知前輩們有無相關的解決辦法,測試情形如下。

JDK1.4:java.awt.Label與javax.swing.JLabelJLabel顯示都正常
JDK5.0:java.awt.Label顯示正常,javax.swing.JLabel部分難字無法顯示(部分難字可以正常顯示)

以下是測試的小程式
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import java.awt.BorderLayout;
import java.awt.Label;
 
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
 
public class TestWord extends JFrame {
 
  private static final long serialVersionUID = 1;
 
  private JPanel jContentPane = null;
 
  private JLabel jLabel = null;
 
  private Label label = null;
 
  /**
   * @param args
   */
  public static void main(String[] args) {
    // TODO Auto-generated method stub
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        TestWord thisClass = new TestWord();
        thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        thisClass.setVisible(true);
      }
    });
  }
 
  /**
   * This is the default constructor
   */
  public TestWord() {
    super();
    initialize();
  }
 
  /**
   * This method initializes this
   * 
   * @return void
   */
  private void initialize() {
    this.setSize(300, 200);
    this.setContentPane(getJContentPane());
    this.setTitle("JFrame");
  }
 
  /**
   * This method initializes jContentPane
   * 
   * @return javax.swing.JPanel
   */
  private JPanel getJContentPane() {
    if (jContentPane == null) {
      label = new Label();
      label.setText("--><--");
      jLabel = new JLabel();
      jLabel.setText("--><--");
      jContentPane = new JPanel();
      jContentPane.setLayout(new BorderLayout());
      jContentPane.add(jLabel, BorderLayout.NORTH);
      jContentPane.add(label, BorderLayout.CENTER);
    }
    return jContentPane;
  }
 
}



1976kevin edited on 2008-05-09 19:51
reply to postreply to post
» JWorld@TW »  Java SE 討論區 » Swing/AWT/SWT/JFace

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8