32,199 Topics

Member Avatar for
Member Avatar for sanam_1

I want to number the row and column . I get row number right around the left hand side ..I want the column number on the top..This is the code I have ..CAN PLLZZ HELP ME WID the column number plzz.. int[][] Board = new int[15][15]; for(int j=0;j<Board.length;j++) System.out.print(" "+j+" …

Member Avatar for sanam_1
0
450
Member Avatar for nramya82

Hello friends, I installed junit4.8.1 in my windows xp, while testing I see following errors.Below are my class path and the location of Junit where I installed. I would really appreciate if some one can help me on this CLASSPATH =.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip;C:\junit4.8.1\junit4.8.1\junit4.8.1.jar JAVA_HOME = C:\Java\jdk1.5.0\bin Junit installation path C:\junit4.8.1\junit4.8.1\junit\tests when …

Member Avatar for HelloMe
0
1K
Member Avatar for HelloMe

My problem is that i have a main menu Class and i want that a MIDI song plays in the background. I research a bit in the internet but i only found to make a sound class... But i dont want to make a own class for it. Isn't there …

0
118
Member Avatar for kaneyip

Given array: int[] dimension = { 1, 2, 3 }; That produces the output: 1 2 3 12 13 23 123 I'm new to array...i can't figure out the way on even how to start... any idea?...really appreaciate if someone could help...thanks!

Member Avatar for JamesCherrill
0
108
Member Avatar for compass

Hi, I need a code for a virtual compass that I would like to include in an application that I manufactured for my task in school.Can anyone help me please?? Tnx

0
122
Member Avatar for JavaNewbieEK

I have an assignment in which I have to read in a series of words using the nextLine method from the Scanner class and then count the number of words using the StringTokenizer class. I know you all like for people to show some initiative by starting the program but …

Member Avatar for anumash
0
189
Member Avatar for sanam_1

how you number the 2d array??i created a 2d array now i want to number the rouws and colums...here is the code i have now [CODE]int[][] Board = new int[15][15]; for (int r = 0; r < Board.length; r++) { for (int c = 0; c < Board.length; c++) { …

Member Avatar for Taywin
0
110
Member Avatar for Buffalo101

Hello, I'm trying to write a simple Clicker program to automate room-joining on GArena: 2 clicks to attempt to join, 1 attempt per 5 seconds. That means I have to simulate 2 x mouseButton1 clicks every 5 seconds - easy. The problem with my clicker, as well as with other …

Member Avatar for Buffalo101
0
195
Member Avatar for Matulin

cacn you help me with this one import java.awt.Graphics; import java.awt.Color; import javax.swing.JApplet; public class Smiley extends JApplet { public void paint (Graphics g) { super.paint(g); g.setColor(new Color (60,10,0)); //outline pants g.drawRect(393,275,199,80); g.drawRect(394,276,199,80); g.setColor(new Color (145,90,0)); //brown (pants) g.drawRect(395,300,197,54); g.fillRect(395,300,197,54); g.setColor(new Color (255,255,255)); g.fillRect(395,275,197,50); //fill white (pants) g.setColor(new Color (32,5,0)); …

Member Avatar for jon.kiparsky
0
442
Member Avatar for HelloMe

Hello... Like the title already says, i have a Panel with a TextField and when a text is entered, i want it to appear on a JLabel that is located on another Panel. Can someone give me the Syntax? Or is it more complicated to do? I do not use …

Member Avatar for ndeniche
0
1K
Member Avatar for elite01

There is a card game I was trying to make for the past two weeks in java. Can be played here => [url]http://www.angelfire...ardtrick02.html[/url] Basically the player picks a card and the program will ask which column contains their card. It than shuffles the cards back together. After doing that three …

Member Avatar for jon.kiparsky
0
513
Member Avatar for mangopearapples

Hey guys, I was wondering how I could make games with Java3D. I've used Java3D but only in static programs. How could I 'repaint' with Java3D (Make games and such)? Also, where could I learn more of Java3D? I've only learn't what I know so far from a few tutorials …

Member Avatar for elite01
0
281
Member Avatar for tj0101

[CODE]/* Problem 3 Writing User-defined Methods Programmer: Date: March 10,2011 ProgramName:Tuition.java */ import java.io.*; import java.text.DecimalFormat; public class Tuition { public static void main(String[] arg) throws IOException { //declare and construct variable int hours; double fees, rate, tuition; //call methods displayWelcome(); hours = getHours(); rate = getRate(hours); tuition = calcTuition(hours, …

Member Avatar for jon.kiparsky
0
342
Member Avatar for mangopearapples

Hey people, How could I make it so when I right click and file and click 'Open With..' and choose my program so it loads the file? I already know how to load the file from when the program is already running and you click 'load' ect... [B]But,[/B] I tried …

Member Avatar for mangopearapples
0
175
Member Avatar for drogba123

Hi, Currently i have an array list listing some bigram. and i would like to have the array list to be formatted like this [am] - [amazing, amber] and so on [bi] - [big, bigas] and so on how should i go about it?thanks for the suggestions. Thanks much

Member Avatar for drogba123
0
119
Member Avatar for mukorera

I have a session bean that I am using to persist data to the database and I need to use Junit testing on the ejb,can someone help me with information on how this can be done maybe with a sample code .I am working on Rational Web-sphere Developer version 7.5

-1
56
Member Avatar for carlitosway17

Hi guys am trying to create a calender that can output the date in three multiple formats In the first case the constructor should receive three integer values. In the second case it should receive a String and two integer values. In the third case it should receive two integer …

Member Avatar for carlitosway17
0
239
Member Avatar for JBeg

Hello, I am a complete beginner with writing java beans. I am supposed to be making a connect four java beans class.The game logic has already been implemented in the form of a Java class called connect4.GameBoard. My professor has provided me with the jar file and javadoc for this …

Member Avatar for end3r
0
197
Member Avatar for rohit2

Hi, Now I am trying to develop a tool using Java Swing. I have used JTextpane as editor of my tool. Now I want to add Content assist for this JTextpane ,so that I can easily type. My purpose is to provide listing of all objects and functions related to …

0
71
Member Avatar for jwenting

Validation whether a string can be parsed to a valid date according to a supplied formatting string (which should conform to the formatting rules as supplied in DateFormat). This version can also flag dates in the past as error (we need that because many of our applications should accept only …

Member Avatar for javaAddict
0
255
Member Avatar for caswimmer2011

Hello, I have this code that sorts strings but it does not sort them at all. I've been working on it for 2 hours already. Any help will be appreciated. Thanks in advance :)[code]public void SelectionSort() { for (int i = 0; i < myList.length - 1; i++) { int …

Member Avatar for mKorbel
0
180
Member Avatar for manish250

I have a jsp page which is showing data in that page from DB.there is also a facility to show data in excel file.So there is a link to import the data in excel file. I have noted down that url by pointing the cursor to that link that is …

Member Avatar for ~s.o.s~
0
224
Member Avatar for SolidSora

I want a loop that can count back and forth from 0 to 3. At first it counts up 1 each time and then when it reaches 3, it will count backwards to 0, then back up to 3 and so on. I already have a runnable that makes it …

Member Avatar for jon.kiparsky
0
3K
Member Avatar for dynaflex

My class recently switched from python to java. I feel like they just threw us in and said " oh they know python so they must know java" My first assignment is quite simple but having no prior knowledge of java i'm lost. basicly "PizzaRun is a simple program that …

Member Avatar for alexsmth114
0
208
Member Avatar for gunjannigam

I need yo draw a shape as attached in the image using Java graphics. I am struggling with the curve part. The curve part is a arc of an circle whose radius and center is known. But I have to paint the region out side of that arc. How will …

Member Avatar for gunjannigam
0
338
Member Avatar for lynnajoe

Hi, I have a quick question. Why would I be getting this: Ljava.lang.String;@24c21495 instead of the information at that address? I have println as my system.out. I am not sure how to format a String[] to make sure I get the information rather than the address. Thank you, lynnajoe

Member Avatar for lynnajoe
0
99
Member Avatar for ToXSiK

All I want to do is have my GUI .java program compile code that the user specifies. [CODE] Process p = Runtime.getRuntime().exec("javac theirJavaFileName.java"); [/CODE] Whenever I run this, I simply get: [CODE] java.io.IOException: Cannot run program "javac theirJavaFileName.java" CreateProcess error=2, The system cannot find the file specified [/CODE] When I …

Member Avatar for mKorbel
0
134
Member Avatar for asif49

[CODE] public static void main(String[] args) { Scanner scan = new Scanner(System.in); String word, end; int length = 1; //length of int is determined here so it can be incremented in loop System.out.println("Enter a word: "); word = scan.next(); while (1 == 1) { end = word.substring (word.length()-length); System.out.print (end …

Member Avatar for asif49
0
96
Member Avatar for SMITA6076

I'm getting errors when I try to compile this code: [CODE]public class EmployeePayRoll { /*** Class Constants ***/ /*** Defaults ***/ public static final String DEFAULT_EMPLOYEE_NAME = "Employee"; public static final double DEFAULT_PAY_RATE = 10.00; public static final double DEFAULT_HOURS_WORKED = 40.0; /*** Minimums/Maximums ***/ public static final double MINIMUM_PAY_RATE …

Member Avatar for jon.kiparsky
0
290
Member Avatar for bibiki

hey there. I have the following code. I am trying to build an applet that displays all possible (92) ways of arranging eight queens on a chess board with no two of them on the same column, row, or diagonal. I built this as an application and it ran fine. …

Member Avatar for mKorbel
0
109

The End.