I just want to know how you would go about creating the array for the grid, and how to create events that are implimented through buttons, i.e. If on the 100 button grid I wanted to go forward 2 blocks a forward button would change the button colour from say red to green.
200827
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.
43844
you could sew flexible magnets into fabric. You may even be able to mount magnets into fabric like you would a button.  \n\nOK I GOTTA ASK... What are you making?
400505
Try searching for  anything similar at www.greenbutton.com\n\nI went through the same thing with mine. I found the answer from that site but can't tell you off hand how right now.
261269
its easy....go to http://www.opencube.com and design the cool java menu. if you have little more knowledge you can go to http://www.milonic.com and design the menu. If you still find problem you can simnply send me the menu items and submenu items, i will design a menu for u.\n\nmail me at anshupp@gmail.com
532808
Couple of points here.\n\n1- All blocks in Java are held between { and }.\nSo an if block would look like:\nif ()\n{\n    ...\n}\nThere is NO if endif block.\n\n2- When doing equal comparison you must use == and NOT = (which is an assignement).\n\nHere is an updated version of your code:\nwhile (response.compareTo("Quit") != 4)\n{\n  if (response == 1)\n  {\n    if (counter < 5)\n    {\n      first = random(10);\n      second = random(10);\n      answerString = JOptionPane.showInputDialog(fi... "+" + second, "= ?");\n      answer = Interger.parseInt(answerString...\n      if (answer == (first + second))\n      {\n        JOptionPane.MessageDialog(null... "Right");\n        numRight = numRight + 1;\n        counter = counter + 1;\n      }\n      else\n      {\n        JOptionPane.MessageDialog(null... "Wrong");\n        numWrong = numWrong + 1;\n        counter = counter + 1;\n      }\n    }\n    else if (count > 5)\n    {\n      JOptionPane.MessageDialog(null... ("Right" + numRight) + ("&#92;nWrong" + numWrong));\n    }\n  }\n  else if (response == 2)\n  {\n    ...\n  }\n  ...\n}\n\nRegards
577307
Yeah thats easy just put them(the colors) in a table. you do this by choosing that as the Cell BGColor, and to put a spin on it make the colors a link.
138619
Try Planet Source Code. Below is a link to a search on their site that has 26 examples...\nhttp://www.planetsourcecode.com/vb/scripts/BrowseCategoryOrSearchResults.asp?blnWorldDropDownUsed=TRUE&txtMaxNumberOfEntriesPerPage=10&blnResetAllVariables=TRUE&txtCriteria=TicTacToe&optSort=Alphabetical&lngWId=3&B1=Quick+Search
546697
set a goal  time you want to run the 100 in and divide that buy 2 and pratice the 50 in that time or less and then run 200  and do the same work on starting blocks and form out of the blocks good luck
187316
Please visit the reference link to know the rules of the game!\n\nA Brief Overview:\nEach row and column of the WHOLE BIG SQUARE(containing nine smaller squares, which in turn contain nine number placeholders each holding one number) should contain all the numbers from 1-9. The individual smaller squares should contain all the numbers from 1-9 too with no repetition whatsoever! Get it? Or follow the links!
626045
Do you have a programming background at all? What type of game are you trying to make? JAVA doesn't lend itself very well to making certain styles of games. \n\nI'd suggest reading Beginning JAVA by Wrox Press to first get a firm grasp on the language.
544405
I couldn't look at your code... mediamax wouldn't let me see it.\nAs far as a gui... if you want a Windows app sort of UI, coding it by hand would take up many times more code than whatever you might have, and would require you to learn the Windows API, which is a huge undertaking.\n\nOtherwise, you can use the graphics capabilities of the compiler you are using to draw simple boxes and such. Drawing rectangles and squares is fairly easy. Moving the cursor to what you've defined as an input box isn't that hard either. Basically you would have a graphical interface in a console app. That's not too hard to do.
352626
what u have done in ur coding is, simply get and input from the user and then display it...\nwhat u need to do is save those inputs into an array..so that the user will be able to at least enter the information about 100 Hobbits\nU can use a two dimensional array to save the user inputs..\nAlso the user should be given the option to continue entering more hobbit information, or view already entered information..
616147
You could dynamically create the page using javascript and have it displayed in a frame.\n\nSo if you have a menu down the side with your game selections in a frame called menu and a display area on the right called game, when the click on the menu item, the game is displayed in the frame on the right.\n\nOr, you could instantiate another window and write the html there.\n\nThis site uses dynamic html where the page does not exist until you click.\n\nhttp://artistic-innovations.com
388282
no there is no other way but to write code for each lines. because each form will open by its own place and its target place. all form are not going open by one button, so you have to write codes therefor every single form. and another thing is you cant not setup property all at a time.
257954
Alright. Here's the deal. \n\nSince this is your first course, here are some tricks.\n\nIf the program will have an input of name, month,and day the hurricane, then you will need 4 variables. A string and 3 integers.\n\nHow will you use them? How many times will you repeat the loop?\n\nIf you do not know how many times you want it to be repeated, then  the wisest choice is a do/while. Otherwise, let the user tell you how many times it should be done.\n\nYou will make those 4 variables. They should be arrays, make sure they are big enough.\n\nit will be something as simple as this:\n\nlet the user tell you how many times he want it to be repeated:\n\nint timesToBeRepeated = 0;\ncin >> timesToBeRepeated;\n\nfor ( int i = 0; i < timesToBeRepeated; i++ )\n{\n\n      cout <<"Enter the Hurricane name: &#92;n";\n      cin >> hurricaneName[i];\n         .\n         .\n         .\n}\n\nthen, to print it out,  just do something like this:\n\ncout <<"Hurricane Name"<<"      <<"Day"<<..<<endl;\n\nthen:\n\nfor ( i = 0; i < timesToBeRepeated; i++ )\n  cout << hurricaneName[i] <<"   "<<....<<endl;\n\nWork out the rest, but that is pretty much it., Any doubt, contact me.
505318
Hi Aditya,\n\nCan you describe why you say it isn't working?  The code you provided should compile just fine.  Are you getting an exception at runtime, or are you getting a compiler error?  Is the error in some code that is using your WordList class?  Please update with some more details.
254175
http://www.sp.uconn.edu/~cdavid/cgi-bin/book/combo1.pl talks about using this ...\n\n"\nIt takes some fooling around to get the split pane to work, since the properties indicated are not what one expects, but with some trial and error one can change the alignment of the two split panels, and move the separator bar. It is wierd that the IRE puts "buttons" in the SplitPane to start with, and you have to ADD your own components to the panes to make it what you expect.\n"\n\n... and gives a source code example.\n\nYou may also want to check out:\n\nhttp://weblogs.java.net/blog/hansmuller/archive/2006/03/multisplitpane.html\nhttp://weblogs.java.net/mt/search?IncludeBlogs=45&search=jsplitpane