大家常常說JBuilder在中文系統中存在光標錯位的問題
都認為這是JBuilder的一個Bug
其實這實在是冤枉JBuilder了!大家討論出來的解決方法無外乎
兩種
將編輯器的字體改為宋體
用這種方法帶來的問題是
在宋體下的英文字體實在難看
閱讀起來不太順眼
就是將編輯器字體的粗體屬性去掉
這樣也影響代碼的可讀性
其實
造成JBuilder光標錯位的問題並不是Borland的錯誤
而是Java的宗師——Sun的罪過!大家一定知道i
n吧?在不同的區域設置中
JDK自動調用與之相對應的properties文件
而在JDK中
Sun所推出的與中文系統相對應的properties文件存在問題
在它之中沒有區分英文字體的正常
粗體和斜體
從而導致了以上所說的問題
解決的方法很簡單
只要將這個properties文件修改正確就可以了
修改方法如下
在jre/lib目錄中找到font
properties
zh文件
編輯這個文件並修改成如下內容
# @(#)font
properties
zh
/
/
#
# AWT Font default Properties for Chinese Windows
#
dialog
plain
=Arial
ANSI_CHARSET
dialog
plain
=\u
b
b\u
f
GB
_CHARSET
dialog
plain
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
dialog
plain
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
dialog
bold
=Arial Bold
ANSI_CHARSET
dialog
bold
=\u
b
b\u
f
GB
_CHARSET
dialog
bold
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
dialog
bold
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
alic
=Arial Italic
ANSI_CHARSET
alic
=\u
b
b\u
f
GB
_CHARSET
alic
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
alic
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
dialog
bolditalic
=Arial Bold Italic
ANSI_CHARSET
dialog
bolditalic
=\u
b
b\u
f
GB
_CHARSET
dialog
bolditalic
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
dialog
bolditalic
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
dialoginput
plain
=Courier New
ANSI_CHARSET
dialoginput
plain
=\u
b
b\u
f
GB
_CHARSET
dialoginput
plain
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
dialoginput
plain
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
dialoginput
bold
=Courier New Bold
ANSI_CHARSET
dialoginput
bold
=\u
b
b\u
f
GB
_CHARSET
dialoginput
bold
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
dialoginput
bold
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
alic
=Courier New Italic
ANSI_CHARSET
alic
=\u
b
b\u
f
GB
_CHARSET
alic
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
alic
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
dialoginput
bolditalic
=Courier New Bold Italic
ANSI_CHARSET
dialoginput
bolditalic
=\u
b
b\u
f
GB
_CHARSET
dialoginput
bolditalic
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
dialoginput
bolditalic
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
serif
plain
=Times New Roman
ANSI_CHARSET
serif
plain
=\u
b
b\u
f
GB
_CHARSET
serif
plain
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
serif
plain
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
serif
bold
=Times New Roman Bold
ANSI_CHARSET
serif
bold
=\u
b
b\u
f
GB
_CHARSET
serif
bold
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
serif
bold
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
alic
=Times New Roman Italic
ANSI_CHARSET
alic
=\u
b
b\u
f
GB
_CHARSET
alic
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
alic
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
serif
bolditalic
=Times New Roman Bold Italic
ANSI_CHARSET
serif
bolditalic
=\u
b
b\u
f
GB
_CHARSET
serif
bolditalic
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
serif
bolditalic
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
sansserif
plain
=Arial
ANSI_CHARSET
sansserif
plain
=\u
b
b\u
f
GB
_CHARSET
sansserif
plain
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
sansserif
plain
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
sansserif
bold
=Arial Bold
ANSI_CHARSET
sansserif
bold
=\u
b
b\u
f
GB
_CHARSET
sansserif
bold
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
sansserif
bold
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
alic
=Arial Italic
ANSI_CHARSET
alic
=\u
b
b\u
f
GB
_CHARSET
alic
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
alic
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
sansserif
bolditalic
=Arial Bold Italic
ANSI_CHARSET
sansserif
bolditalic
=\u
b
b\u
f
GB
_CHARSET
sansserif
bolditalic
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
sansserif
bolditalic
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
monospaced
plain
=Courier New
GB
_CHARSET
monospaced
plain
=\u
b
b\u
f
GB
_CHARSET
monospaced
plain
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
monospaced
plain
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
monospaced
bold
=Courier New Bold
GB
_CHARSET
monospaced
bold
=\u
b
b\u
f
GB
_CHARSET
monospaced
bold
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
monospaced
bold
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
alic
=Courier New Italic
GB
_CHARSET
alic
=\u
b
b\u
f
GB
_CHARSET
alic
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
alic
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
monospaced
bolditalic
=Courier New Bold Italic
GB
_CHARSET
monospaced
bolditalic
=\u
b
b\u
f
GB
_CHARSET
monospaced
bolditalic
=WingDings
SYMBOL_CHARSET
NEED_CONVERTED
monospaced
bolditalic
=Symbol
SYMBOL_CHARSET
NEED_CONVERTED
# name aliases
#
#alias
timesroman=serif
#alias
helvetica=sansserif
#urier=monospaced
# for backward compatibility
#timesroman
=Times New Roman
ANSI_CHARSET
#helvetica
=Arial
ANSI_CHARSET
#courier
=Courier New
ANSI_CHARSET
zapfdingbats
=WingDings
SYMBOL_CHARSET
# font filenames for reduced initialization time
#
filename
\u
b
b\u
f
=SIMSUN
TTF
filename
Arial=ARIAL
TTF
filename
Arial_Bold=ARIALBD
TTF
filename
Arial_Italic=ARIALI
TTF
filename
Arial_Bold_Italic=ARIALBI
TTF
filename
Courier_New=COUR
TTF
filename
Courier_New_Bold=COURBD
TTF
filename
Courier_New_Italic=COURI
TTF
filename
Courier_New_Bold_Italic=COURBI
TTF
filename
Times_New_Roman=TIMES
TTF
filename
Times_New_Roman_Bold=TIMESBD
TTF
filename
Times_New_Roman_Italic=TIMESI
TTF
filename
Times_New_Roman_Bold_Italic=TIMESBI
TTF
filename
WingDings=WINGDING
TTF
filename
Symbol=SYMBOL
TTF
# Default font definition
#
default
char=
# Static FontCharset info
#
#fontcharset
dialog
=sun
io
CharToByteCp
fontcharset
dialog
=sun
io
CharToByteGBK
fontcharset
dialog
=sun
awt
windows
CharToByteWingDings
fontcharset
dialog
=sun
awt
CharToByteSymbol
#fontcharset
dialoginput
=sun
io
CharToByteCp
fontcharset
dialoginput
=sun
io
CharToByteGBK
fontcharset
dialoginput
=sun
awt
windows
CharToByteWingDings
fontcharset
dialoginput
=sun
awt
CharToByteSymbol
#fontcharset
serif
=sun
io
CharToByteCp
fontcharset
serif
=sun
io
CharToByteGBK
fontcharset
serif
=sun
awt
windows
CharToByteWingDings
fontcharset
serif
=sun
awt
CharToByteSymbol
#fontcharset
sansserif
=sun
io
CharToByteCp
fontcharset
sansserif
=sun
io
CharToByteGBK
fontcharset
sansserif
=sun
awt
windows
CharToByteWingDings
fontcharset
sansserif
=sun
awt
CharToByteSymb
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19525.html