开发者

Creating a Empathy chat window-like main view in Netbeans Platform

Before anything, I should admit that I am completely a newbie about Java Swing.

I am trying to create an application that lists emails similar to the way that Empathy displays a conversation.

What I want to achieve is like this: http://img69.imageshack.us/img69/5356/emailsx.png

They are going to be clickable.

The thing I have done was getting a JPanel on top of a JScrollPane, making the JPanel have GridLayout and trying to add components dynamically, but it looks plain ugly. Is there a way to do it in Swing or shoul开发者_如何学运维d I resort to using graphical images for the task? Also, how would I fix text placement if I used graphical images?


I'd consider using a JTable with a custom renderer in the scroll pane. You'll also want to look at JTabbedPane. Filthy Rich Clients is a popular choice for how to enhance a GUI.


I had problems with resizing in almost every layout manager. Finally I made something similar by designing a custom JPanel for a message. Then I added this custom JPanel dynamically using GroupLayout for each of the messages.

For the horizontal layout, I used ParallelGroup; and for the vertical layout, I used SequentialGroup.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜