JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Java 技巧文件  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 EasyPanel - 簡單的設定Panel的背景
Yoshi

塵世中一個迷途小書僮

版主

發文: 874
積分: 22
於 2004-06-06 02:30 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
使用範例::
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import javax.swing.*;
import java.awt.*;
public class TestEasyPanel extends JFrame {
    public TestEasyPanel() {
      Container container = getContentPane();
      EasyPanel panel = new EasyPanel("PlayListBackground.jpg");
      container.add(panel);
      panel.add(new JTextArea(5,10));
      panel.add(new JButton("Hello World"));
 
      setBounds(100,100,370,230);
      show();
    }
 
  public static void main(String[] args) {
    TestEasyPanel obj = new TestEasyPanel();
    obj.setDefaultCloseOperation(EXIT_ON_CLOSE);
  }
}


就可以簡單的顯示出背景::

下載EasyPanel::
http://www.javaworld.com.tw/jute/user/download/52243/EasyPanel.java

PS: 包成Jar檔時也可以

EasyPanel.java (1.23k)


Yoshi edited on 2007-04-25 15:14
reply to postreply to post
YOSHI!
作者 Re:EasyPanel - 簡單的設定Panel的背景 [Re:Yoshi]
roukiss





發文: 1
積分: 0
於 2004-06-28 01:40 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
为什么在JApplet不能用EasyPanel
那又应该用什么还实现


reply to postreply to post
» JWorld@TW »  Java 技巧文件

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8