惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

博客园 - tatung zhang

全屏显示问题 sun发布lwuit1.4 深入理解 LWUIT 框架的 MVC lwuit控件关系模式图,Padding和Margin关系图 eclipse rcp 获取工程项目路径 eclipse content assist 代码提示功能失效解决办法 LWUIT 1.3 发布了 Eclipse RCP中添加第三方jar包的办法 lwuit---调整滚动条灵敏度值 j2me获取手机IMEI保证软件信息安全解决方案 show一下最新项目的界面图 谈谈移动开发 lwuit ---一些细节疑难杂症整理笔记 lwuit-list 困扰我的列颜色改变 lwuit-tab与list配合使用 lwuit-List控件使用 lwuit控件布局定位 VS2005创建智能设备项目失败 wince嵌入式应用程序开发环境搭建
lwuit---更改字体大小
tatung zhang · 2009-08-10 · via 博客园 - tatung zhang

lwuit默认的字体是比较小的,所以我们可以在系统上做个设置字体大小的。
首先在Midlet上设置字体大小,
   Font.setDefaultFont(Font.createSystemFont(Font.FACE_SYSTEM,
       Font.STYLE_PLAIN, Font.SIZE_MEDIUM));
 Font.SIZE_MEDIUM这个值改成读变量的,
然后就是读取了,在 UIManager类上:

    public Style getComponentStyle(String id){
        Style style 
= null;
        
        
if(id == null || id.length() ==0){
            
//if no id return the default style
            id = "";
        }
else{
            id 
= id + ".";
        }
        
        style 
= (Style)styles.get(id);
        
        
if(style == null){
            style 
= createStyle(id);
            styles.put(id, style);
        }
//设置系统字体(读取)
        style.setFont(Font.getDefaultFont());
        
        
return new Style(style);
    }

更改的时候只有对未初始化的窗体更改能够马上生效,其他的需要退出程序才能生效。