1,myeclipse中的swing界面设计怎么操作呀点一下控件 , 在页面上在点一下,就会拖拽过去了 。不过拖拽出来的都是group布局的 , 很复杂,不好用啊没得恢复了...除非你用硬盘恢复的软件...不要做Swing了,没什么前途
2,用他设计窗体应该怎么做还有swing到底是怎么用在Java里的有的 用windowbuilder这个是我在Eclipse上试过这个是官方提供的工具,是一个Eclipse插件windowbuilder插件工具不如VS那样强大,不要祈求能有C#的效果 , 清理缓存,从新编译project-->clean
3 , 我的Myeclipse为什么没有Swing插件这样做图形化设计很费劲不能把这两个文件夹直接放到myEclipse安装目录的dropins目录下即可本来就是没有的,在安装软件中心可以搜索到,在线安装重启下就行了,插件好像叫massive swing吧,就是把netbeans的插件给移植过来了,nb中做好的窗口在mye里也能打开 。你好!Myeclipse得自己下插件 , java桌面程序的开发IDE必然属于Netbeans了!您可以去官网下载个,这个IDE开发桌面程序很强大如有疑问,请追问 。请问 你是哪里下载的这两个插件?。。浚 。扛曳輘wing插件,,谢谢了【idea中Swing设计工具,myeclipse中的swing界面设计怎么操作呀】
4,如何用idea开发swing你可以用JavaFx来开发界面 。近日,JetBrains针对IntelliJ IDEA 12.1版本发布了一个JavaFX插件(不好发链接 , 你可以自己搜索一下),该插件中包含了使用IntelliJ IDEA创建JavaFX应用的所有指令,包括与JavaFX场景生成器的互操作性、甲骨文的JavaFX可视化布局工具等 。从甲骨文公司的一系列举动可以看出 , 该公司对JavaFX的支持力度正在逐步加大 。自JDK 7u9开始,该技术已经默认捆绑在JDK中发布了,且在今年上半年,JavaFX将成为一个完全开源的技术和平台 。package swingtest;// 这个类放到swingtest下public class testframe public static void main(string[] args) new jframe("测试用的frame").setvisible(true); }}5,如何使用 Swing 组件 JTableimport java.awt.BorderLayout;import java.awt.Color;import java.awt.Component;import java.awt.Dimension;import java.awt.FlowLayout;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Date;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.JScrollPane;import javax.swing.JTable;import javax.swing.table.AbstractTableModel;import javax.swing.table.DefaultTableCellRenderer;import javax.swing.table.TableCellRenderer;import javax.swing.table.TableModel;import javax.swing.table.TableRowSorter;public class TableFrame extends JFrame private static final long serialVersionUID = 1L; private final String[] NAMES =private final String[][] DATA =http://www.lisdn.com/gkrj/shwd/private JTable tableView = null; private SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd"); public TableFrame ( String title )order ();setTitle (title); } private void order ()tryfor ( int i = 0; i < DATA.length; i++ )for ( int j = i + 1; j < DATA.length; j++ )if (sdf.parse (DATA[i][0]).before (sdf.parse (DATA[j][0])))String[] temp = DATA[i];DATA[i] = DATA[j];DATA[j] = temp;}}}}catch (ParseException e)} private void createTable ()TableModel dataModel = new AbstractTableModel ()private static final long serialVersionUID = 1L;public int getColumnCount ()return NAMES.length;}public int getRowCount ()return DATA.length;}public Object getValueAt ( int row, int col )return DATA[row][col];}public String getColumnName ( int column )return NAMES[column];}};tableView = new JTable (dataModel);Date date = new Date ();final String dt = sdf.format (date);tableView.setDefaultRenderer (Object.class, new TableCellRenderer ()@Overridepublic Component getTableCellRendererComponent ( JTable table, Object value, boolean isSelected,boolean hasFocus, int row, int column )Component render =new DefaultTableCellRenderer ().getTableCellRendererComponent (table, value, isSelected,hasFocus, row, column);if (dt.equals (table.getValueAt (row, 0)))render.setBackground (Color.RED);}return render;}});TableRowSortertableRowSorter = new TableRowSorter (dataModel); tableView.setRowSorter (tableRowSorter); JScrollPane scrollpane = new JScrollPane (tableView); scrollpane.setPreferredSize (new Dimension (500, 200)); setLayout (new BorderLayout ()); add (scrollpane, BorderLayout.CENTER); JPanel panel = new JPanel (); panel.setSize (500, 100); panel.setLayout (new FlowLayout (FlowLayout.CENTER)); add (panel, BorderLayout.SOUTH); } private static void initFrame ( TableFrame tc ) { tc.setSize (512, 300); tc.setResizable (false); tc.setLocationRelativeTo (null); tc.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); tc.setVisible (true); } public static void main ( String[] args ) { TableFrame tc = new TableFrame ("TableFrame"); tc.createTable (); initFrame (tc); } }import java.awt.borderlayout;import java.awt.color;import java.awt.component;import java.awt.dimension;import java.awt.flowlayout;import java.text.parseexception;import java.text.simpledateformat;import java.util.date;import javax.swing.jframe;import javax.swing.jpanel;import javax.swing.jscrollpane;import javax.swing.jtable;import javax.swing.table.abstracttablemodel;import javax.swing.table.defaulttablecellrenderer;import javax.swing.table.tablecellrenderer;import javax.swing.table.tablemodel;import javax.swing.table.tablerowsorter;public class tableframe extends jframe{ private static final long serialversionuid = 1l; private final string[] names = { "转正时间", "体检时间" }; private final string[][] data = http://www.lisdn.com/gkrj/shwd/{ {"2014-11-08", "2013-11-08" }, { "2014-06-03", "2013-11-08" }, { "2014-01-01", "2013-11-08" }, { "2014-12-02", "2013-11-08" }, { "2014-11-08", "2013-11-08" }, { "2014-12-02", "2013-11-08" }, { "2014-10-08", "2013-11-08" }, { "2014-12-02", "2013-11-08" }, { "2014-09-08", "2013-11-08" }, { "2014-11-08", "2013-11-08" } }; private jtable tableview = null; private simpledateformat sdf = new simpledateformat ("yyyy-mm-dd"); public tableframe ( string title ) { order (); settitle (title); } private void order () { try { for ( int i = 0; i < data.length; i++ ) { for ( int j = i + 1; j < data.length; j++ ) { if (sdf.parse (data[i][0]).before (sdf.parse (data[j][0]))) { string[] temp = data[i]; data[i] = data[j]; data[j] = temp; } } } } catch (parseexception e) {} } private void createtable () { tablemodel datamodel = new abstracttablemodel () { private static final long serialversionuid = 1l; public int getcolumncount () { return names.length; } public int getrowcount () { return data.length; } public object getvalueat ( int row, int col ) { return data[row][col]; } public string getcolumnname ( int column ) { return names[column]; } }; tableview = new jtable (datamodel); date date = new date (); final string dt = sdf.format (date); tableview.setdefaultrenderer (object.class, new tablecellrenderer () { @override public component gettablecellrenderercomponent ( jtable table, object value, boolean isselected, boolean hasfocus, int row, int column ) { component render = new defaulttablecellrenderer ().gettablecellrenderercomponent (table, value, isselected, hasfocus, row, column); if (dt.equals (table.getvalueat (row, 0))) { render.setbackground (color.red); } return render; } }); tablerowsortertablerowsorter = new tablerowsorter (datamodel); tableview.setrowsorter (tablerowsorter); jscrollpane scrollpane = new jscrollpane (tableview); scrollpane.setpreferredsize (new dimension (500, 200)); setlayout (new borderlayout ()); add (scrollpane, borderlayout.center); jpanel panel = new jpanel (); panel.setsize (500, 100); panel.setlayout (new flowlayout (flowlayout.center)); add (panel, borderlayout.south); } private static void initframe ( tableframe tc ) { tc.setsize (512, 300); tc.setresizable (false); tc.setlocationrelativeto (null); tc.setdefaultcloseoperation (jframe.exit_on_close); tc.setvisible (true); } public static void main ( string[] args ) { tableframe tc = new tableframe ("tableframe"); tc.createtable (); initframe (tc); }}
推荐阅读
- 驱动精灵
- 元气骑士ios330,DNF男气功念气罩多少级可以点满满级为多少级分身多少级点满
- 高级android开发简历,android程序员怎么写简历
- c语言应该用什么软件,编写C语言程序用什么编程软件
- 电影库怎么做,怎么建立影库啊
- c语言常用头文件有哪些,C语言里的头文件有
- 多玩魔兽世界
- fc小霸王模拟器手机版,手机单机角色游戏
- 新手怎么开始学编程加工中心的,加工中心编程怎么学