I'm trying to make a java array of 100 buttons. The buttons are supposed to be in a grid layout of 10x10?
446757
Maybe you could add buttons to a panel sort of like this:\n\nbtns = new JButton[10][10];\nfor (int y = 0; y < 10; y++)\n{\nfor (int x = 0; x < 10; x++)\n{\nint i = (x+1) + y*10;\nbtns[x][y] = new JButton(""+i);\nbtns[x][y].setPreferredSize( new Dimension(60, 60));\nbtns[x][y].addActionListener( this);\npanel.add(btns[x][y], -1);\n}\n}\n\nThen, in the actionPerformed method, do something like this:\n\nfor (int y = 0; y < 10; y++)\n{\nfor (int x = 0; x < 10; x++)\n{\nif (e.getSource() == btns[x][y])\n// do something based on the coordinates\n}\n}\n\n\nI hope this helps.
457026
Create a method called numDigits(long). Then you can use code something like this:\n\nint num;\ncin >> num;\n\nint numDigs = numDigits( num );\nint digits[ numDigs ];\nint temp = num;\nfor ( int i = numDigs - 1; i >= 0; i-- )\n{\n digits[ i ] = temp % 10;\n temp = (int)( temp / 10 );\n}\n\nThe digits array holds each of the digits in the number.\nThis is the code I used for numDigits():\n\nint numDigits( long num )\n{\nint digits;\nfor ( digits = 0; num > 0; digits++ )\n{\nnum /= 10;\n}\n\nreturn digits;\n}
394360
dont know but just resize them, open the pic in paint and click stretch/skew try putting 50 in both boxes (this means it will skew to half the size 200 would be double the size) and resend should work
271307
It has nothing to do with Java, except that you can\nimplement it in Java (just like you can with C or C++\nor Pascal or whatever).\n\nInsertion sort is distinct from bubble and selection sort.\nThe short description is that for each element, you \nfind the right position, shift everything up, and insert\nthe element.  It's very inefficient for large arrays, but\nit actually does pretty well for small arrays.  Because\nof this, it is sometimes used to finalize the array \nsegments which have been sorted using something like\nquicksort.\n\nSee the references for more information.
809649
try... www.hotfreelayouts.com
405582
All yours\nhttp://nico.nfshost.com/tools/multiplication-table.php\n\nJust resize to 100 x 100 at the bottom
859662
This sounds like an assignment! Anyhow...\nCreate an array of 10. Then create a for loop of ten and each time ask for the user for an input. Store that input to the array. Then using a loop again output the array to the listbox
1157853
make the startup position of your window to maximized.\n\nto automatically align your command buttons at runtime, look for a code at\nhttp://www.planetsourcecode.com/
643763
http://ciber.min-data.co.uk/buttons/
1027584
make one no... but you can go to freecodesource.com and they have some premade layouts... don't know if you'll find what you're looking for though
1069450
this is a java scrpit code\nu can download sothink DHTML menu software to make this kind of menues
950370
I don`t kno how to make layouts`z. will somebody help ME !
46941
" Fill in the grid so that every row,\nevery column, and every 3x3 box\ncontains the digits 1 through 9.\nRead this page:\nhttp://www.sudoku.com/
565897
Possibly you have it set to automatically re-arrange.  Here are the steps to fix it.\n\nClick on the Desktop\ngo to View > Show View Options \nuncheck the box next to "Keep Arranged By"\n\nThe Snap to Grid option may be checked as well.\nThis option is in that same box.
775869
Reset the icon using null, e.g. \nbutton.setIcon(null);\n\nNote that if all you do is the above (and set the background to a color), then the button will be resized to the minimal default.  To preserve the button's size, retrieve the preferredSize() before setting the icon to null, and then reset the preferred size.
1100864
http://gridviewguy.com/ArticleDetails.aspx?articleID=72\n\nThat article should give you a good idea on how to do this.
816071
The default content pane of JFrame will have a BorderLayout manager set on it.\nWhen using this layout manager you must specify the region (north, south, center, east, west) where to fit the component.\nSo your code should look like this:\n\n        contentPane.add(stuff, BorderLayout.CENTER);\n        contentPane.add(b1, BorderLayout.SOUTH);\n\nIt's ugly but at least you'll see your two components.\nTo make it more elegant you'll have to either use another layout manager and/or possibly use some additionnal panels to hold your components.\n\nYou should learn how to use layout managers here:\nhttp://java.sun.com/docs/books/tutorial/uiswing/layout/using.html\n\nAs a side note the kind of window (error message) you are trying to create already exists in Swing.\nHave a look at the JOptionPane.showMessageDialog( ) methods:\nhttp://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JOptionPane.html\n\nRegards