关于作者

用户名:SwingWalker
笔名:SwingWalker
地区:

日历  

快速登录

+ 用户名:
+ 密 码:

我的博采 我的论坛 我的RSS

文章索引

在线留言


留言后如果没有显示请刷新页面

访问统计:871



Powered by BlogDriver 2.1

Swing Walker

 

文章

Swing 指南一篇

Java Swing/Java 2D的范围很广。以下是最近的一些链接。  其中有一些是标准的教程比如: New to Java,  Swing tutorial,  Java 2D tutorial and  Swing Sightings ( 最近添加的:21 )  ,如果你是新手并打算做Swing的话应该看一下。  而下面是最近的一些文章:<image>

Chat Transcript -
Getting High Performance from Your Desktop
What's New In Swing
Project Looking Glass
NetBeans 4.1 IDE Early Access

>The Synth Look and Feel
>JDNC .7 Released
>Professional Swing : Threading   one  two
>Asserting Control Over the GUI : Commands, Defaults and Resource Bundles
>Creating Wizard Dialogs with Java Swing
>VolatileBufferedToolkitImage Strategies
>Developing Complex User Interface Applications in Java (Presentation 2002)
>JDNC .7 Released
>SwingSet an open source toolkit of data-aware Swing replacements
>More Than 50 Swing Component Libraries  one  two
>Swing Depot : Component Suites
Romain Guy's Blog
3D Splash Screen with Swing
Dynamic Debugging with Swing
Cool UI
Shadow Splash Screen
Search with Style    one  follow-up
Drag with Style in Swing
Wait with Style in Swing
3D with Swing
Wave UI     one  two  three

>Swing : Example MVX Patterns for Applications
>Swing : Example MVC Pattern for Applications
>Using GridBagLayout
>Data Models for Desktop Apps
>JDesktop Network Components (June 2004)
>JDNC Documentation
>Quaqua Look and Feel
>winLAF.org - Swing and Windows Look-and-Feel  intro    release notes
>Glazed Lists - A toolkit for list transformations
>Java2D Hardware Accelerating - Volatile Images   Buffer Strategies
>The JModalWindow Project
>Swing : Per Platform Polishing
>Java2D/Swing : Finding Font Coordinates via Font Metrics
>A JScrollPane Corner with a View
>Swing with Zing : Designing Effective Rich Clients (Presentation)
>JDesktop Integration Components   one  two
>JFormDesigner (product)
>flexdock
>NetBeans IDE 4.1 Tutorial for Applets
>Swing Threading   one   two
>Advanced Synth : Custom UIs are a breeze with Newest Swing Look&Feel
>ComboBox Renderer and Editor in JTable from David Shay's Swinging blog
>Dialogs in the taskbar from David Shay's Swinging blog
>Editing a cell with double-click from David Shay's Swinging blog
>JList As A Container from David Shay's Swinging blog
>Hiding Columns in a JTable from David Shay's Swinging blog
>Create Cool 3D Icons with Java
>Create Stylish Glass Pane on long GUI-Blocking Operations  with animation
RJ Lorimer's Articles
AWT/Swing : Big Brother is Watching (Your Mouse)
Java2D : Screenshots with Java
Swing : Decorating Icons for the Holidays
Swing : System Tray Icons
Swing : Trees with TreeNodes
Swing : Tables Like Icons Too
Swing : File System Fun Survey Swing's File System
Swing : Stop GUI Freezing with Spin
Swing : The Grey Fog
JGoodies : Understanding Binding   one  two  three  four
JGoodies : Using the Button Builders
Desktop Java : Self Executing JARs
Swing : Sizing Windows
Graphics : Painting Textures Fast
 


 
>Swing : Tiling Windows
>Swing : Cascading Windows
>Quick Radial Blurring with Java2D

 
>Java Game Development Series -  intro  one
>How to camera and transmit live video in applet ? (forum example)
>Lighting A 3D Scene
>Lightweight Java Game Library (LWJGL)
>JCanyon Updated


- 作者: SwingWalker 2005年03月24日, 星期四 17:20  回复(0) |  引用(0) 加入博采

分享Swing学习的一些经验

首先是要有一定的Java基础,
入门我推荐的是sun网站上的JFC tutorial
http://java.sun.com/docs/books/tutorial/uiswing/index.html

入门之后的书籍呢?
中文的比较经典,比较系统的Swing书籍是
JAVA2图形设计卷2:SWING  http://www.dearbook.com.cn/book/viewbook.aspx?pno=TS008033
JFC核心编程(第2版) http://www.dearbook.com.cn/book/viewbook.aspx?pno=TS0018989
这两本都是经典书籍,都不错,缺点是比较早,都是在JDK1.3以前的

最近的新书有两本
JAVA SWING(第二版) http://www.dearbook.com.cn/book/viewbook.aspx?pno=TS0027715
JFC SWING标准教材(第二版) http://www.dearbook.com.cn/book/viewbook.aspx?pno=TS0028428

英文的新书我比较喜欢的是
Manning - JAVA Swing 2nd.Edition (2004).pdf
这本书在国外的评价也挺高的,基于JDK1.4,讲得比较深入,例子也比较有用

当然,工作看书之余还需要关注一些东西,比如一些优秀的项目,Swing开发经验分享,
这些从哪里来呢?
国内论坛上相关的资源比较少,而且大多数停留在新手问问题的阶段,
所以做Swing的话,要习惯上英文站点,习惯看英文资料,习惯看英文的ebook,
下面是我的收藏夹中的一些站点
http://www.clientjava.com/blog/
这个站点非工作日几乎每天都会更新,java 客户端的新闻,还有做java客户端的老外的
blog更新,这个站点像窗口一样,使我对Swing的了解面大有提升
http://community.java.net/javadesktop/
官方站点,更新不快,不过发布的文章什么的还是值得一看的
http://www.javadesktop.org/forums/index.jspa
官方的论坛,你提的问题可能是Sun的工程师来回答你哦

中文的Java Gui站点我好像没看到过,国内相关的东西还是太少
论坛中java gui的板块有:
http://bbs.chinajavaworld.com/post/page?bid=6&sty=1&age=0
http://www.cjsdn.net/post/page?bid=46&sty=1&age=30
http://www.javaresearch.org/forum/forum.jsp?column=286


做Swing的不能埋头做Swing
Swing的一大优势就是网上资源的丰富
下面我列一些比较流行、比较Cool的组件
http://www.jgoodies.com
https://jdic.dev.java.net/
https://jdnc.dev.java.net/
http://www.einnovation.com/projects/eiicommons/
http://www.yworks.com/
http://www.infonode.net/
具体自己上网看看啦:)
 找组件可以到这两个网址看看:
http://javadesktop.org/rollups/components/index.html
http://community.java.net/projects/community/javadesktop
也可以到sourceforge搜搜看

关于Swing的性能
推荐一下这份资料
http://java.sun.com/docs/books/performance/
作者是 Sun's Java Performance Team 中的,而且原来是
Swing Team负责人之一,所以这份资料也从各个方面讲述
Swing的性能问题
另外提供两份资料,是最近的sun desktop关于
java client 性能问题的会议上的资料
附件[High-Performance Clients 1 Minimizing Startup Time.pdf]
http://blog.blogchina.com/upload/2005-02-22/2005022219264771860.pdf
附件[High-Performance Clients Runtime Graphics and UI Performance.pdf]
http://blog.blogchina.com/upload/2005-02-22/20050222192431495749.pdf

Swing相关的知识:
        1 javabean  Swing是附和java bean规范的,也用到了java.beans package里不少内容
           还是推荐sun的资料:http://java.sun.com/docs/books/tutorial/javabeans/
        2 java thread  对于java线程的理解和掌握是编出反应敏捷,高质量的Swing程序的必备知识
           经典的书籍:Concurrent Programming in Java
                            Orelly Java Thread 3rd


最后,不得不提一个人的blog,最近这家伙做的一些Swing的小的效果,很养眼
http://jroller.com/page/gfx   Romain Guy's Weblog

 


 


- 作者: SwingWalker 2005年02月22日, 星期二 15:47  回复(2) |  引用(0) 加入博采

一个设置所有swing控件字体的方法
import javax.swing.*;
import javax.swing.plaf.FontUIResource;
import java.awt.*;
 
public class TestFont {
    public static void main(String[] args) {
 
        setUIFont(new FontUIResource("Serif", Font.ITALIC, 30));
        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel panel = new JPanel();
        JLabel label = new JLabel("Test");
 
        panel.add(label);
        frame.add(panel);
        frame.pack();
        frame.setVisible(true);
    }
 
    public static void setUIFont(FontUIResource f) {
//
// sets the default font for all Swing components.
// ex.
//  setUIFont (new javax.swing.plaf.FontUIResource("Serif",Font.ITALIC,12));
//
        java.util.Enumeration keys = UIManager.getDefaults().keys();
        while (keys.hasMoreElements()) {
            Object key = keys.nextElement();
            Object value = UIManager.get(key);
            if (value instanceof javax.swing.plaf.FontUIResource)
                UIManager.put(key, f);
        }
    }
}


the key method is
public static void setUIFont(FontUIResource f)

you can insert it in you code and use it when your application starts

if you need to change font for particular components
you can use just

UIManager.put("Label.font",new Font("Serif",Font.ITALIC,12));

check a complete set of UI defaults
here http://www.rgagnon.com/javadetails/JavaUIDefaults.txt

Hope this helps


- 作者: SwingWalker 2005年02月3日, 星期四 14:38  回复(0) |  引用(0) 加入博采

已锁定
此日志的浏览权限已被作者锁定,请同作者联系,发送短消息,如果你的身份符合作者的要求,点击此处可以进行浏览

- 作者: SwingWalker 2005年02月3日, 星期四 09:15  回复(0) |  引用(0) 加入博采

Swing with Zing:Designing Effective Rich Clients

This is a Sun Tech Days presentation on Swing by Chet Haase that I recently found while trolling java.sun.com. It covers new features in Tiger, JDIC, JDNC, Synth and Managed Images among its topics.

看来JDIC JDNC 都快成为Swing程序员必须了解的API之一了

附件[SwingZing.pdf]
http://blog.blogchina.com/upload/2005-02-02/20050202094947134376.pdf


- 作者: SwingWalker 2005年02月2日, 星期三 10:03  回复(0) |  引用(0) 加入博采

已锁定
此日志的浏览权限已被作者锁定,请同作者联系,发送短消息,如果你的身份符合作者的要求,点击此处可以进行浏览

- 作者: SwingWalker 2005年02月2日, 星期三 09:36  回复(0) |  引用(0) 加入博采