32,204 Topics
| |
I need to know how to create a triangle, and how to fill it with color. I am new to programming and would appreciate the help. I am not running the applet in a web browser, just executing it. Thanks. | |
[code] import javax.swing.JFrame; import java.awt.*; import java.awt.event.*; import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JTextField; import javax.swing.UIManager; public class GUINew extends JDialog implements ActionListener { public static void main (String [] args) { protected JButton ok; protected JButton cancel; protected ButtonGroup type; protected JTextField … | |
Hi all, I think I might try my hand at creating a text based adventure game in java. No I don't need cutting edge graphics, or state of the art fatalities etc what I am looking for is a solid, story driven adventure/RPG game. I would appreciate some advice on … | |
Dear all I get this code from java.sun. I want to sort my columns tables. But line 3 and 4 are not working. I use Netbeans and already add JDK 6 to Netbeans platform. Any suggestion or information from all of you ?? JTable table = new JTable(new MyTableModel()); table.setPreferredScrollableViewportSize(new … | |
I can't figure out why this won't exit when quit is entered. [ICODE] import java.io.*; import java.util.*; public class Trial { static final String ADD_COMMAND = "add"; static final String REMOVE_COMMAND = "remove"; static final String QUIT_COMMAND = "quit"; static final String PRINT_COMMAND = "print"; // Create a single shared … | |
Hi! I just had a quick question that I can't seem to find the answer to anywhere. My book isn't helping me much and I have no one to turn to for help. Anyways, here's my question: I want to make it so that when you click a Button in … | |
i am trying to create website where i have to upload the images.. i am storing the context name in the database.. after uploading the image, the image is copied to specified folder but when trying to display it. the old image is not changing to newly uploaded image..... | |
he i made a simple reservation system please help me with code on how i can cancel a reservation [code=java] import java.util.Scanner; import java.util.Date; public class reservation { // Create an array of 12 seats, 6 window and 6 aisle. private static int[] seats = new int[12]; public static void … | |
Hi all, Here is the structure of my XML file. [CODE]<?xml version="1.0"?> <data> <key>468</key> <name>pal</name> <option>10</option> </data>[/CODE] I want to read the option tag value, then increment it by 4 and write it to the same location. So at the end XML file content like this. [CODE]<?xml version="1.0"?> <data> <key>468</key> … | |
Hi I'm doing a project in java.It is the game othello.It was all going well till i got an [B]ArrayOutOfBoundsException[/B]. the array is this buttons[9][9]; If you dont know othello it's a board game with an 8x8 board. The Exact error is "ArrayOutOfBoundsException: 9" and give the lines which the … | |
Hey, I've recently started to learn Java with a little prior experince in C++. Only the basics. I was just wondering if there any pointers for getting this language down. I'm talking about stuff that I won't pick up from some book or exercise. Something you've all come across in … | |
Hello everybody! I am a beginner in Java and need some help plz How could i build a structure trie from a matrix Thx | |
Hi I know its a bit odd but i am freshly new to java and in a real need to solve few progs by EOD . Really stressed ..please help me out in solving below progs ... ************************** Task 1 Write a visitor for a structure of Strings (i.e. one … | |
I am in the middle of a program and have a quick question and not sure how i do this... "have the Frame display in the center of the monitor " [code=java] //import packages import java.awt.*; import java.awt.event.*; import java.awt.datatransfer.*; import java.text.DecimalFormat; import javax.swing.JOptionPane; //create a subclass at the fram … | |
I am using java.util.map to store some data ( one key and two values , per row ) in java and return it to a python function . What kind of a data structre should I use in python to catch it? (btw I am using Jython as a bridge … | |
i need 6th version java tutorial immaculate | |
i need to display the contents of a database(table) MS access db, on to the screen. how do i got abt it??? the data keeps changing dynamically...the program should be able to refresh it self | |
Hi, I am kiran I have a task like If I click one option box like country then corresponding states to appear,than I click states than next option box must display cities.please see this link you will get an idea [url]http://www.bharatbloodbank.com/search.php[/url] How to do it in struts. If I want … | |
:?: Hi: I am postin in this forum because someone told me all the windows applications were developed in visual basic. I need to know which is the DLL associated with the sound recorder. I nedd to use the record method to call it from a java application. I hope … | |
following masijade advice i tried busting my head abit. i have written the following code import java.awt.event.*; import java.awt.*; import javax.swing.*; import javax.swing.border.*; public class Game extends JApplet implements ActionListener { //Creating a new JPanel called panel1 JPanel panel1 = new JPanel(); //Creating a JLabel for panel1 JLabel header = … | |
Hi, I am working on a sort of stack calculator. If anyone can suggest a better method please advice: Basically, using the stringtokenizer to break the string into tokens. If the token does not equal "add" or "sub" or if the token is a digit push it onto the stack... … | |
this is the output on server init: deps-jar: compile-single: run-single: checking the client of ip 169.254.86.65 checking the client at port 59000 checking the client at hostname RAF System with169.254.86.65is online probing the client of ip 169.254.86.65 creating the client of ip 169.254.86.65 whose hostname is RAF at port 59000 … | |
I'm able to set UIManager for UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel") and UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel") but for UIManager.setLookAndFeel("com.sun.java.swing.plaf.metal.MetalLookAndFeel") I get an error like this : java.lang.ClassNotFoundException: com.sun.java.swing.plaf.metal.MetalLookAndFeel What's wrong with my code ?? Thanks, Kusno. | |
im having problems with my java homework. I really need help. I need to use a loop make sure what the user input for their grade is vaild the grade has to be between 150 and 0. So can somebody show me the code to use import java.util.Scanner; // Needed … | |
to anyone who can help me out with this its of no big importance i was stumbling one day and this came across this little snit bit of what looks to be like a program or something so i tried starting it and i have no idea whats going on … | |
hi, i am new to java... i need to start two programs in a server just after user clicks a button in the jform. for this i may require multi threading.. can any one plz give me a small example or a link where i can see threads created, each … | |
I need help with this coding because I am having trouble with a lab of my class. I am up for any hints/tips and techniques... and code if desired. Well I am hoping that someone will respond and thanks. | |
> Using a Binary Search Tree > Using the LinkedBinarySearchTree class in the jss2 for chapters 12 and 13, write a program that exercises all of the operations except: > removAllOccurrences > findAgain > replacement > Details > Your program will read instruction from the file: numbers.txt > The file … | |
Hey I am a newbie in java and I was wondering if someone can help me. Where would I place [QUOTE]int [] qDifference = new int [3]; for(int i = 0; i < 3; i++) { qDifference[i] = q[i + 1] - q[i]; }[/QUOTE] in the code below to show … | |
Hi, I get the following exception when i try to run the following code segment. [code=JAVA] stmt = (Statement) conn.createStatement(); rs = stmt.executeQuery( "SHOW TABLES"); if(rs.first()) { stmt.execute( "DROP TABLE " + rs.getString(1)); while (rs.next()){ stmt.execute( "DROP TABLE " + rs.getString(1)); } } [/code] And the exception i get is: … |
The End.