1. swing - changing the maximize button behavior stackoverflow.com
|
2. Odd JButton behavior java-forums.orgpublic void createButtons() { int x = 0; int y = 0; int xGrid = 20; int yGrid = 20; p1 = new JButton[15][8]; //p2 = new JButton[15][8]; for(int ticker=0; ticker<120; ticker++) { p1[x][y] = new JButton(); p1[x][y].setSize(10,10); p1[x][y].addActionListener(this); p1[x][y].setActionCommand(x+" "+y); if(ticker == 0) { p1[x][y].setLocation(xGrid, yGrid); } else if((ticker%15) == 0) { xGrid = 20; p1[x][y].setLocation(xGrid, (yGrid+10)); } else { ... |