Swing(1) - architecture
来源:互联网 发布:linux系统能玩lol吗 编辑:程序博客网 时间:2024/05/12 07:42
A Swing Architecture Overview
http://java.sun.com/products/jfc/tsc/articles/architecture/#delegate
code sample to change jtextpane color, font:
// set on the text area.
MutableAttributeSet attrs = jtp.getInputAttributes();
// Set the font family, size, and style, based on properties of
// the Font object. Note that JTextPane supports a number of
// character attributes beyond those supported by the Font class.
// For example, underline, strike-through, super- and sub-script.
StyleConstants.setFontFamily(attrs, font.getFamily());
StyleConstants.setFontSize(attrs, font.getSize());
StyleConstants.setItalic(attrs, (font.getStyle() & Font.ITALIC) != 0);
StyleConstants.setBold(attrs, (font.getStyle() & Font.BOLD) != 0);
// Set the font color
StyleConstants.setForeground(attrs, c);
// Retrieve the pane's document object
StyledDocument doc = jtp.getStyledDocument();
// Replace the style for the entire document. We exceed the length
// of the document by 1 so that text entered at the end of the
// document uses the attributes.
doc.setCharacterAttributes(0, doc.getLength() + 1, attrs, false);
- Swing(1) - architecture
- [Java Swing]Architecture Review
- A Swing Architecture Overview
- Architecture Design - 1 What is Architecture
- J2EE Architecture(1)
- System architecture No.1
- QNX system architecture 1
- Android Architecture Components(1)
- Architecture
- ARCHITECTURE
- MMORPG服务器 - Design Architecture 1
- Android Framework architecture -- bluez(1)
- Android Framework architecture -- bluez(1)
- 1-LTE Network Architecture: Basic
- Intel x86_64 Architecture Background(1)
- 读书笔记1 oracle architecture overview
- 1-LTE Network Architecture: Basic
- Using Swing Components(1)
- DRTM/SRTM
- c语言良好的程序设计习惯(4)
- kosaraju+缩点
- 【开源】司马编译器结构
- 再找不到工作,我就跳楼
- Swing(1) - architecture
- 工作=生活=游戏
- [收藏]Strtok详解
- POJ 1236 Network of Schools
- 神秘欢喜佛:男女双修的西藏密宗法门
- 视频时代的反思
- 基于MyEclipse6.5的SSH整合
- 开源建站系统——phpnuke8安装步骤
- 什么是HTTPS?