当前位置:七道奇文章资讯编程技术Java编程
日期:2011-03-22 16:14:00  来源:本站整理

JBuilder光标问题的办理策划[Java编程]

赞助商链接



  本文“JBuilder光标问题的办理策划[Java编程]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:

大家常常说JBuilder在中文系统中存在光标错位的问题,都认为这是JBuilder的一个Bug,其实这实在是冤枉JBuilder了!大家谈论出来的办理办法无外乎两种:

1、将编辑器的字体改成宋体,用这种办法带来的问题是,在宋体下的英文字体实在丢脸,阅读起来不太顺眼;

2、就是将编辑器字体的粗体属性去掉,这样也影响代码的可读性.

其实,造成JBuilder光标错位的问题并非Borland的错误,而是Java的宗师——Sun的罪过!大家一定知道i18n吧?在差别的区域设置中,JDK自动调用与之相对应的properties文件,而在JDK中,Sun所推出的与中文系统相对应的properties文件存在问题,在它之中没有辨别英文字体的正常、粗体和斜体,从而招致了以上所说的问题,办理的办法很简单,只要将这个properties文件改正精确便可以了,改正办法以下:

在jre/lib目录中找到font.properties.zh文件,编辑这个文件并改正成以下内容:

# @(#)font.properties.zh1.16 00/10/06
#
# AWT Font default Properties for Chinese Windows
#
dialog.plain.0=Arial,ANSI_CHARSET
dialog.plain.1=u5b8bu4f53,GB2312_CHARSET
dialog.plain.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.plain.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialog.bold.0=Arial Bold,ANSI_CHARSET
dialog.bold.1=u5b8bu4f53,GB2312_CHARSET
dialog.bold.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.bold.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialog.italic.0=Arial Italic,ANSI_CHARSET
dialog.italic.1=u5b8bu4f53,GB2312_CHARSET
dialog.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialog.bolditalic.0=Arial Bold Italic,ANSI_CHARSET
dialog.bolditalic.1=u5b8bu4f53,GB2312_CHARSET
dialog.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialog.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.plain.0=Courier New,ANSI_CHARSET
dialoginput.plain.1=u5b8bu4f53,GB2312_CHARSET
dialoginput.plain.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.plain.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.bold.0=Courier New Bold,ANSI_CHARSET
dialoginput.bold.1=u5b8bu4f53,GB2312_CHARSET
dialoginput.bold.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.bold.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.italic.0=Courier New Italic,ANSI_CHARSET
dialoginput.italic.1=u5b8bu4f53,GB2312_CHARSET
dialoginput.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.bolditalic.0=Courier New Bold Italic,ANSI_CHARSET
dialoginput.bolditalic.1=u5b8bu4f53,GB2312_CHARSET
dialoginput.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
dialoginput.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
serif.plain.0=Times New Roman,ANSI_CHARSET
serif.plain.1=u5b8bu4f53,GB2312_CHARSET
serif.plain.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
serif.plain.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
serif.bold.0=Times New Roman Bold,ANSI_CHARSET
serif.bold.1=u5b8bu4f53,GB2312_CHARSET
serif.bold.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
serif.bold.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
serif.italic.0=Times New Roman Italic,ANSI_CHARSET
serif.italic.1=u5b8bu4f53,GB2312_CHARSET
serif.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
serif.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
serif.bolditalic.0=Times New Roman Bold Italic,ANSI_CHARSET
serif.bolditalic.1=u5b8bu4f53,GB2312_CHARSET
serif.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
serif.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.plain.0=Arial,ANSI_CHARSET
sansserif.plain.1=u5b8bu4f53,GB2312_CHARSET
sansserif.plain.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.plain.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.bold.0=Arial Bold,ANSI_CHARSET
sansserif.bold.1=u5b8bu4f53,GB2312_CHARSET
sansserif.bold.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.bold.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.italic.0=Arial Italic,ANSI_CHARSET
sansserif.italic.1=u5b8bu4f53,GB2312_CHARSET
sansserif.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.bolditalic.0=Arial Bold Italic,ANSI_CHARSET
sansserif.bolditalic.1=u5b8bu4f53,GB2312_CHARSET
sansserif.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
sansserif.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.plain.0=Courier New,GB2312_CHARSET
monospaced.plain.1=u5b8bu4f53,GB2312_CHARSET
monospaced.plain.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.plain.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.bold.0=Courier New Bold,GB2312_CHARSET
monospaced.bold.1=u5b8bu4f53,GB2312_CHARSET
monospaced.bold.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.bold.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.italic.0=Courier New Italic,GB2312_CHARSET
monospaced.italic.1=u5b8bu4f53,GB2312_CHARSET
monospaced.italic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.italic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.bolditalic.0=Courier New Bold Italic,GB2312_CHARSET
monospaced.bolditalic.1=u5b8bu4f53,GB2312_CHARSET
monospaced.bolditalic.2=WingDings,SYMBOL_CHARSET,NEED_CONVERTED
monospaced.bolditalic.3=Symbol,SYMBOL_CHARSET,NEED_CONVERTED
# name aliases
#
#alias.timesroman=serif
#alias.helvetica=sansserif
#alias.courier=monospaced
# for backward compatibility
#timesroman.0=Times New Roman,ANSI_CHARSET
#helvetica.0=Arial,ANSI_CHARSET
#courier.0=Courier New,ANSI_CHARSET
zapfdingbats.0=WingDings,SYMBOL_CHARSET
# font filenames for reduced initialization time
#
filename.u5b8bu4f53=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=2751
# Static FontCharset info.
#
#fontcharset.dialog.0=sun.io.CharToByteCp1252
fontcharset.dialog.1=sun.io.CharToByteGBK
fontcharset.dialog.2=sun.awt.windows.CharToByteWingDings
fontcharset.dialog.3=sun.awt.CharToByteSymbol
#fontcharset.dialoginput.0=sun.io.CharToByteCp1252
fontcharset.dialoginput.1=sun.io.CharToByteGBK
fontcharset.dialoginput.2=sun.awt.windows.CharToByteWingDings
fontcharset.dialoginput.3=sun.awt.CharToByteSymbol
#fontcharset.serif.0=sun.io.CharToByteCp1252
fontcharset.serif.1=sun.io.CharToByteGBK
fontcharset.serif.2=sun.awt.windows.CharToByteWingDings
fontcharset.serif.3=sun.awt.CharToByteSymbol
#fontcharset.sansserif.0=sun.io.CharToByteCp1252
fontcharset.sansserif.1=sun.io.CharToByteGBK
fontcharset.sansserif.2=sun.awt.windows.CharToByteWingDings
fontcharset.sansserif.3=sun.awt.CharToByteSymbol
#fontcharset.monospaced.0=sun.io.CharToByteCp1252
fontcharset.monospaced.1=sun.io.CharToByteGBK
fontcharset.monospaced.2=sun.awt.windows.CharToByteWingDings
fontcharset.monospaced.3=sun.awt.CharToByteSymbol
# Exclusion Range info.
#
exclusion.dialog.plain.0=00a0-f8ff
exclusion.dialog.italic.0=00a0-f8ff
exclusion.dialog.bold.0=00a0-f8ff
exclusion.dialog.bolditalic.0=00a0-f8ff
exclusion.dialoginput.plain.0=00a0-f8ff
exclusion.dialoginput.italic.0=00a0-f8ff
exclusion.dialoginput.bold.0=00a0-f8ff
exclusion.dialoginput.bolditalic.0=00a0-f8ff
exclusion.serif.plain.0=00a0-f8ff
exclusion.serif.italic.0=00a0-f8ff
exclusion.serif.bold.0=00a0-f8ff
exclusion.serif.bolditalic.0=00a0-f8ff
exclusion.sansserif.plain.0=00a0-f8ff
exclusion.sansserif.italic.0=00a0-f8ff
exclusion.sansserif.bold.0=00a0-f8ff
exclusion.sansserif.bolditalic.0=00a0-f8ff
exclusion.monospaced.italic.0=00a0-f8ff
exclusion.monospaced.bold.0=00a0-f8ff
exclusion.monospaced.bolditalic.0=00a0-f8ff
# charset for text input
# inputtextcharset=GB2312_CHARSET

保存后,一切问题就办理了!

这种办法也实用于任何相同的问题.

[题外话]这种错误SUN真的应当好好查验一下了,但愿今后他们做的东西可以测试更好一些.


  以上是“JBuilder光标问题的办理策划[Java编程]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
  • JBuilder 2005单元测试之成立测试用例
  • JBuilder 2005单元测试之捆绑多个用例
  • JBuilder 2005单元测试之业务类介绍
  • JBuilder 2005单元测试之慨述
  • JBuilder 2005单元测试体验之测试配置
  • JBuilder 2005单元测试之JUnit框架
  • <b>JBuilder 2005单元测试之成立测试固件</b>
  • JBuilder和JDeveloper的简单比较
  • 操作JBuilder2005开辟Web操纵程序
  • JBuilder 2005开辟Applet游戏全接触
  • 用JBuilderX开辟WEB操纵程序
  • JBuilder 2005 Struts深度体验之变革
  • 本文地址: 与您的QQ/BBS好友分享!
    • 好的评价 如果您觉得此文章好,就请您
        0%(0)
    • 差的评价 如果您觉得此文章差,就请您
        0%(0)

    文章评论评论内容只代表网友观点,与本站立场无关!

       评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论
    Copyright © 2020-2022 www.xiamiku.com. All Rights Reserved .