32,204 Topics

Member Avatar for
Member Avatar for dlightfoot15

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.

Member Avatar for jasimp
0
146
Member Avatar for Taker

[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 …

Member Avatar for blufab
0
113
Member Avatar for majestic0110

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 …

Member Avatar for majestic0110
0
686
Member Avatar for Kusno

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 …

Member Avatar for Ezzaral
0
146
Member Avatar for dakrous

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 …

Member Avatar for blufab
0
73
Member Avatar for Someguy02

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 …

Member Avatar for darkagn
0
90
Member Avatar for japkpc

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.....

0
134
Member Avatar for saintb

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 …

Member Avatar for saintb
0
714
Member Avatar for eranga262154

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> …

Member Avatar for eranga262154
0
106
Member Avatar for hallinan

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 …

Member Avatar for hallinan
0
514
Member Avatar for JakeCourtney

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 …

Member Avatar for peter_budo
0
174
Member Avatar for Vanessa.KH

Hello everybody! I am a beginner in Java and need some help plz How could i build a structure trie from a matrix Thx

Member Avatar for jasimp
0
40
Member Avatar for skyineyes

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 …

Member Avatar for jwenting
0
105
Member Avatar for jimJohnson

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 …

Member Avatar for jimJohnson
0
139
Member Avatar for heshan

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 …

Member Avatar for bumsfeld
0
54
Member Avatar for imma.infotech
Member Avatar for abdulraqeeb33

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

Member Avatar for Ezzaral
0
172
Member Avatar for kumar.vsv

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 …

Member Avatar for jwenting
0
71
Member Avatar for luisator

:?: 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 …

Member Avatar for jasimp
0
68
Member Avatar for saintb

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 = …

Member Avatar for masijade
0
128
Member Avatar for KimJack

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... …

Member Avatar for javaAddict
0
813
Member Avatar for abdulraqeeb33

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 …

0
105
Member Avatar for Kusno

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.

Member Avatar for Kusno
0
244
Member Avatar for oakdale95

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 …

Member Avatar for jasimp
0
108
Member Avatar for chickenmcnugget

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 …

Member Avatar for chickenmcnugget
0
78
Member Avatar for abdulraqeeb33

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 …

Member Avatar for abdulraqeeb33
0
110
Member Avatar for pinoyboi619

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.

Member Avatar for jasimp
0
65
Member Avatar for dimples09

> 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 …

Member Avatar for dimples09
0
162
Member Avatar for welbyobeng

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 …

Member Avatar for welbyobeng
0
89
Member Avatar for yassar

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: …

Member Avatar for Ezzaral
0
149

The End.