摘要:
http://www.blogjava.net/lcs/archive/2007/11/01/157474.htmlprivate void drawLine(int x, int y, Graphics g) { g.setColor(Color.red); g.drawLine(0, y, x, y); g.drawLine(x, y, x + 7, y - 7); g.drawLine(x + 7, y - 7, x + 14, y); g.drawLine(x + 14, y, 980, y); }SwingUtilities.invokeLater(newRunnable(){pub 阅读全文
摘要:
for (Component co : up.getContentPane().getComponents()) { System.out.println(co.getClass().toString()); //得到co的类型 if (co.getClass().toString().toLowerCase().contains("jpanel")) { for (Component control : ((JPanel)co).getComponents()) { System.out.println(control.getClass().toString()); // 阅读全文