ITeye博客

swing

共 7 篇文章

重写JTextArea(文字添加方式)

大家都知道,往JTextArea添加新内容的时候,它默认是将新内容添加在后面,小小地改动了下,让它反过来显示,新增加的内容放在上面. 直接上代码: /** * JTextAreaReverseDisplay * @author java_jun */ public class JTextAreaReverseDisplay extends JFrame { public JTextAreaReverseDisplay() { JTextArea area = new JTextArea(); area.setDocument(new ReverseDocument(area)); JScro…

2010-07-22 10:55 · swing

swing定制外观

花了点时间看看了synth(swing定制外观),在网上找了半天没有看到一个非常完整的例子(包括代码,配置文件),所以自己写了一个完整的,放在这里.(当然参考了网上的). 1,java代码 import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.UIManager; import javax.swing.plaf.synth.SynthLookAndFeel; public class GUI { public static void main(String[] args) throws Except…

2010-03-25 21:03 · swing

swing透明窗体

public class TranslucentWindow extends JFrame { public TranslucentWindow() { super("透明窗体"); this.setLayout(new FlowLayout()); this.add(new JButton("按钮")); this.add(new JCheckBox("复选按钮")); this.add(new JRadioButton("单选按钮")); this.add(new JProgressBar(20, 100)); this.setSize(new Dimension(400, 300));…

2010-03-12 10:40 · swing

Sun 用 swing写的内存监控小工具,很强

效果预览

2010-03-12 10:31 · swing

分享ProgressMonitorInputStream之用法--进度条展示

import java.io.FileInputStream; import javax.swing.ProgressMonitor; import javax.swing.ProgressMonitorInputStream; public class ProgressMonitorTest { public static void main(String args[]) throws Exception { // declare ProgressMonitorInputStream Object ProgressMonitorInputStream monitor; /** * @par…

2010-02-05 13:58 · swing

Swing设计工具

注: 我只统计我用过的。。。最重要的是我只是告诉大家,我可没做其他的!!! 希望对大家有帮助 。。。。。 1,Jbuilder,这个应该很多人都用过了,就不多说了 2,NetBeans,Sun出的IDE,现在越来越好用了,网址 http://netbeans.org/ 要指出的是以前两个设计器设计好了图型后切换到代码的时候,它的核心设计UI的那部分代码是不可以改的。。。 3,Myeclipse,这个做J2EE的应该很熟悉了,EclipseIDE的一个很好的插件(有的人在Eclipse和Myeclipse谁是IDE,谁是插件上要挣扎很久,不知为什么。。), 6.6之前的版本都不支持Swing设…

2010-02-04 14:25 · swing

swing 调试工具

今无意中发现一十分实用的swing调试工具 Swing Explorer 现在最新版本是1.4官网是: https://swingexplorer.dev.java.net 它还可以以eclipse插件的形式安装,使用起来非常容易。 1,这是我起的一个swing小应用 2,随之而启动的Swing Explorer主界面 3,它将会把你的应用中的所有组件全部列出来(图左),然后你可以用其提供的功能来调试你的应用了。 喜欢的话就去研究吧。 下载地址: https://swingexplorer.dev.java.net/downloads.html

2010-02-04 11:43 · swing