锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲AV无码久久精品蜜桃,国产91精品一区二区麻豆亚洲,亚洲一级免费视频 http://m.tkk7.com/sitinspring/category/23797.htmlA man dose his can util the destiny was revealed. zh-cn Sat, 23 Feb 2008 04:24:13 GMT Sat, 23 Feb 2008 04:24:13 GMT 60 JTable甯歌鐢ㄦ硶緇嗗垯 http://m.tkk7.com/sitinspring/archive/2007/12/18/168425.html濡傚潗鏄ラ 濡傚潗鏄ラ Tue, 18 Dec 2007 03:04:00 GMT http://m.tkk7.com/sitinspring/archive/2007/12/18/168425.html http://m.tkk7.com/sitinspring/comments/168425.html http://m.tkk7.com/sitinspring/archive/2007/12/18/168425.html#Feedback 0 http://m.tkk7.com/sitinspring/comments/commentRss/168425.html http://m.tkk7.com/sitinspring/services/trackbacks/168425.html 闃呰鍏ㄦ枃 ]]> 濡備綍璁㏒wing鎺т歡濡侸Label,JButton絳夋樉紺哄姩鎬丟if鍥劇墖 http://m.tkk7.com/sitinspring/archive/2007/09/08/143557.html濡傚潗鏄ラ 濡傚潗鏄ラ Sat, 08 Sep 2007 01:42:00 GMT http://m.tkk7.com/sitinspring/archive/2007/09/08/143557.html http://m.tkk7.com/sitinspring/comments/143557.html http://m.tkk7.com/sitinspring/archive/2007/09/08/143557.html#Feedback 3 http://m.tkk7.com/sitinspring/comments/commentRss/143557.html http://m.tkk7.com/sitinspring/services/trackbacks/143557.html 闃呰鍏ㄦ枃 ]]> 鍒╃敤MouseAdapter鏉ュ疄鐜拌嚜鎺掑簭鐨勮〃鏍?/title> http://m.tkk7.com/sitinspring/archive/2007/07/09/129060.html濡傚潗鏄ラ 濡傚潗鏄ラ Mon, 09 Jul 2007 07:58:00 GMT http://m.tkk7.com/sitinspring/archive/2007/07/09/129060.html http://m.tkk7.com/sitinspring/comments/129060.html http://m.tkk7.com/sitinspring/archive/2007/07/09/129060.html#Feedback 2 http://m.tkk7.com/sitinspring/comments/commentRss/129060.html http://m.tkk7.com/sitinspring/services/trackbacks/129060.html
闃呰鍏ㄦ枃 ]]> 涓涓劅瑙傦紙LookAndFeel錛夎彍鍗曠被鍙婂叾鐢ㄦ硶 http://m.tkk7.com/sitinspring/archive/2007/06/28/126694.html濡傚潗鏄ラ 濡傚潗鏄ラ Thu, 28 Jun 2007 00:47:00 GMT http://m.tkk7.com/sitinspring/archive/2007/06/28/126694.html http://m.tkk7.com/sitinspring/comments/126694.html http://m.tkk7.com/sitinspring/archive/2007/06/28/126694.html#Feedback 1 http://m.tkk7.com/sitinspring/comments/commentRss/126694.html http://m.tkk7.com/sitinspring/services/trackbacks/126694.html 1.綾諱唬鐮佸涓?/strong> package com.junglesong.mvc.common.menu;
import java.awt.event.ActionEvent; import java.awt.event.ActionListener;
import javax.swing.ButtonGroup; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JRadioButtonMenuItem; import javax.swing.SwingUtilities; import javax.swing.UIManager;
/** * 紼嬪簭椋庢牸鑿滃崟 * @author junglesong@gmail.com * */ public class StyleMenu extends JMenu { // 紼嬪簭鐨勪富妗嗘灦 final JFrame mainFrame; /** * 鏋勯犲嚱鏁?br> * @param text:鑿滃崟鏉℃枃瀛?br> * @param frame:紼嬪簭鐨勪富妗嗘灦 */ public StyleMenu(String text,JFrame frame) { super(text); mainFrame=frame; addSubMenuItems(); }
/** * 娣誨姞涓嬬駭鑿滃崟欏?br> * */ private void addSubMenuItems() { // 鍙栧緱緋葷粺褰撳墠鍙敤鎰熻鏁扮粍 UIManager.LookAndFeelInfo[] arr = UIManager .getInstalledLookAndFeels();
ButtonGroup buttongroup = new ButtonGroup(); for (int i = 0; i < arr.length; i++) { JRadioButtonMenuItem styleMitem = new JRadioButtonMenuItem( arr[i].getName(), i == 0); final String className = arr[i].getClassName(); // 娣誨姞涓嬬駭鑿滃崟欏圭殑浜嬩歡鐩稿簲 styleMitem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { UIManager.setLookAndFeel(className); SwingUtilities.updateComponentTreeUI(mainFrame); } catch (Exception ex) { System.out.println("Can't Change Lookandfeel Style to " + className); } } }); buttongroup.add(styleMitem); this.add(styleMitem); } } } 2.鐢ㄦ硶濡備笅
JMenuBar menubar = new JMenuBar(); mainFrame.setJMenuBar(menubar); ...... menubar.add(Box.createHorizontalGlue()); JMenu styleMenu = new StyleMenu("Syle", mainFrame); menubar.add(styleMenu); ......
渚嬪浘錛?br>
]]>鍦↗Table涓婄偣鍑誨彸閿茍寮瑰嚭鑿滃崟鐨勫疄鐜?/title> http://m.tkk7.com/sitinspring/archive/2007/06/12/123729.html濡傚潗鏄ラ 濡傚潗鏄ラ Tue, 12 Jun 2007 14:23:00 GMT http://m.tkk7.com/sitinspring/archive/2007/06/12/123729.html http://m.tkk7.com/sitinspring/comments/123729.html http://m.tkk7.com/sitinspring/archive/2007/06/12/123729.html#Feedback 1 http://m.tkk7.com/sitinspring/comments/commentRss/123729.html http://m.tkk7.com/sitinspring/services/trackbacks/123729.html 鏍規嵁鐐瑰嚮鐨勪綅緗帹綆楁墍鍦ㄨ,濂戒簡,搴熻瘽灝戣,鐪嬩唬鐮佸惂.1.琛ㄦ牸鐨勫緩绔嬭繃紼?br>
String[] headers = { "No", "Table Name" }; Object[][] cellData = null;
DefaultTableModel model = new DefaultTableModel(cellData, headers) { public boolean isCellEditable(int row, int column) { // 絎琋鍒楀彲浠ョ紪杈?br> /* * if (column == N) { return false; } */
// 鏁翠釜琛ㄩ兘涓嶈兘緙栬緫 return false; } };
table = new JTable(model);2.鑿滃崟鐨勫緩绔?/em> popupMenu=new JPopupMenu(); tableNameItem=new JMenuItem(""); selectItem=new JMenuItem("Select SQL"); insertItem=new JMenuItem("Insert SQL"); deleteItem=new JMenuItem("Delete SQL"); updateItem=new JMenuItem("Update SQL"); hbmItem=new JMenuItem("hbm xml"); hbmPojoItem=new JMenuItem("Pojo Class"); popupMenu.add(tableNameItem); popupMenu.addSeparator(); popupMenu.add(selectItem); popupMenu.add(insertItem); popupMenu.add(deleteItem); popupMenu.add(updateItem); popupMenu.addSeparator(); popupMenu.add(hbmItem); popupMenu.add(hbmPojoItem);3.鑿滃崟鐨勫脊鍑哄鐞?br> table.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { if (evt.isPopupTrigger()) { // 鍙栧緱鍙抽敭鐐瑰嚮鎵鍦ㄨ int row=evt.getY()/table.getRowHeight(); /** * 鍙栧緱鏄〃鍚嶇殑閭d竴鍒?br> */ int tableNameColumn=-1; for(int i=0;i<table.getColumnModel().getColumnCount();i++){ TableColumn selColumn = table.getColumnModel().getColumn(i); String columnHeader=(String)selColumn.getHeaderValue(); if(columnHeader.equals("Table Name")){ tableNameColumn=i; break; } } /** * 鍙栧緱琛ㄥ悕騫跺脊鍑鴻彍鍗?br> */ if(tableNameColumn!=-1){ /** * 淇敼鑿滃崟棣栨潯鐨勫悕縐?br> */ String tableName=(String)table.getValueAt(row,tableNameColumn); tableNameItem.setText(tableName); // 寮瑰嚭鑿滃崟 popupMenu.show(evt.getComponent(), evt.getX(), evt.getY()); } } } } 4.瀹炵幇鐨勬晥鏋滃涓?
]]> 灝佽瀹屾瘯,鑳芥樉紺哄綋鍓嶆椂闂村茍鏀瑰彉椋庢牸鐨勮彍鍗曠被 http://m.tkk7.com/sitinspring/archive/2007/06/08/122753.html濡傚潗鏄ラ 濡傚潗鏄ラ Thu, 07 Jun 2007 17:00:00 GMT http://m.tkk7.com/sitinspring/archive/2007/06/08/122753.html http://m.tkk7.com/sitinspring/comments/122753.html http://m.tkk7.com/sitinspring/archive/2007/06/08/122753.html#Feedback 0 http://m.tkk7.com/sitinspring/comments/commentRss/122753.html http://m.tkk7.com/sitinspring/services/trackbacks/122753.html 1 import java.awt.event.ActionEvent; 2 import java.awt.event.ActionListener; 3 import java.text.SimpleDateFormat; 4 import java.util.Calendar; 5 import javax.swing.ButtonGroup; 6 import javax.swing.JMenu; 7 import javax.swing.JRadioButtonMenuItem; 8 import javax.swing.Timer; 9 10 public class TimeMenu extends JMenu{ 11 private static final long serialVersionUID = 1L ; 12 private final static int ONE_SECOND = 1000 ; 13 private String timeStyle = "" ; 14 15 public TimeMenu(String text){ 16 super (text); 17 timeStyle = " yyyy-MM-dd HH:mm:ss " ; 18 timer.start(); 19 addSubMenuItems(); 20 } 21 22 Timer timer = new Timer(ONE_SECOND, new ActionListener(){ 23 public void actionPerformed(ActionEvent evt){ 24 setCurrTimeToText(); 25 } 26 }); 27 28 private void addSubMenuItems(){ 29 String[] items = new String[]{ " yyyy-MM-dd HH:mm:ss " , " HH:mm:ss " , " yyyy-MM-dd " }; 30 31 ButtonGroup buttongroup = new ButtonGroup(); 32 33 for ( int i = 0 ; i < items.length; i ++ ) { 34 JRadioButtonMenuItem timeMitem = new JRadioButtonMenuItem( 35 items[i], i == 0 ); 36 37 final String timeStyleTmp = items[i]; 38 timeMitem.addActionListener( new ActionListener() { 39 public void actionPerformed(ActionEvent e) { 40 try { 41 timeStyle = timeStyleTmp; 42 } catch (Exception ex) { 43 System.out.println( " Can't Change Time Style to " 44 + timeStyleTmp); 45 } 46 } 47 }); 48 buttongroup.add(timeMitem); 49 this .add(timeMitem); 50 } 51 } 52 53 private void setCurrTimeToText(){ 54 this .setText(getCurrTime(timeStyle)); 55 } 56 57 private String getCurrTime(String timeStyle){ 58 Calendar cal = Calendar.getInstance(); 59 SimpleDateFormat fromatter = new SimpleDateFormat(timeStyle); 60 String strCurrTime = fromatter.format(cal.getTime()); 61 62 return strCurrTime; 63 } 64 }
鐢ㄦ硶濡備笅:
1 JMenuBar menubar = new JMenuBar(); 2 mainFrame.setJMenuBar(menubar); 3 4 5 6 TimeMenu timeMenu = new TimeMenu( " Time " ); 7 menubar.add(timeMenu); 8 9
]]>
主站蜘蛛池模板:
亚洲A∨无码一区二区三区 |
亚洲视频在线精品 |
亚洲一区精品视频在线 |
59pao成国产成视频永久免费 |
亚洲精品午夜无码专区 |
美女无遮挡拍拍拍免费视频 |
中文字幕精品无码亚洲字 |
暖暖免费中文在线日本 |
亚洲日韩中文字幕日韩在线 |
国产99久久久国产精免费 |
亚洲精品成人片在线播放 |
免费人成在线观看视频高潮 |
亚洲va无码专区国产乱码 |
91香蕉在线观看免费高清 |
亚洲日韩国产精品无码av |
影音先锋在线免费观看 |
久久精品国产亚洲AV天海翼 |
亚洲精品岛国片在线观看 |
东北美女野外bbwbbw免费 |
亚洲最大的成网4438 |
在线观看免费人成视频色9 |
亚洲精品无码专区久久 |
亚洲成a人片在线观看国产 |
a视频在线观看免费 |
亚洲第一成年网站大全亚洲 |
成年人视频在线观看免费 |
jizzjizz亚洲日本少妇 |
亚洲精品无码高潮喷水在线 |
亚洲成人免费在线观看 |
亚洲熟妇成人精品一区 |
亚洲日韩VA无码中文字幕 |
97精品免费视频 |
亚洲av乱码一区二区三区按摩 |
亚洲AV无码之日韩精品 |
午夜精品一区二区三区免费视频 |
亚洲一级片在线观看 |
亚洲免费无码在线 |
99久久免费精品高清特色大片 |
亚洲欧美日韩中文字幕一区二区三区
|
精品国产sm捆绑最大网免费站 |
亚洲一区二区三区丝袜 |