35,618 Topics

Member Avatar for
Member Avatar for digan

Hi I am trying to make a program that prints a snooker board on the screen. I am trying to print the different parts on top of each other. So far all I am able to do is print the background. when i try to print the cloth on top …

Member Avatar for hiddepolen
0
388
Member Avatar for grako84

Hi Folks! I got to game (know as concentration or memory)code for my assignment. I have found many similar tasks, but mine is a bit different. Our teacher asked us to implement comboBox that we could switch between images and text version. So far I have made image one, and …

Member Avatar for grako84
0
255
Member Avatar for applejax77

Looking for Java help! I am working on the payroll program below and would like some help please. When I run the prograom, I am using jGrasp, the program runs with no errors identified in the code but I get the following window that pops up...."No main methods, applets, or …

Member Avatar for hfx642
0
2K
Member Avatar for Jessurider

how to get only the file name from the given path............ [B]example1:[/B] String str1="C:\New Folder\My Data\kk.png" From the above how can we get only the file [B]kk.png[/B] [B]example2: [/B] String str1="C:\New Folder\My Data\Java\Project\yy.bmp" From the above how can we get only the file [B]yy.bmp[/B]

Member Avatar for JamesCherrill
0
102
Member Avatar for ashsailesh

i am using an array of JButtons b[23].... my objective is that when i click a button it has to change its background color to black but it is giving a nullpointer exception.... if(ae.getActionCommand().equals("0")) { System.out.println("button b[o] is pressed"); b[0].setBackground(Color.black); } } can anyone help me with this please........

Member Avatar for hfx642
0
124
Member Avatar for techyworld

Write the definition of a class student. Student object should represent student in a school. it should contain the following information: id,name,age,address. Can someone tellme the definition using this example?? am still a newbie in java.

Member Avatar for jackmaverick1
0
99
Member Avatar for RaigaX9

Hello again everyone, on my recent thread about my rock, paper, scissors program, I had trouble running it from Applet to JApplet and that problem was solved. So far, I've added many functions for the program such as menus, checking your score, resetting the score, and setting the number of …

Member Avatar for jackmaverick1
0
444
Member Avatar for nicolebdillen

[CODE]//Program to find the sum of the main and right diagonals of a 2D array import java.io.*; public class Diagonals { public static void main(String[]args)throws IOException { int arr[][]={{1,2,3,4},{1,2,3,4},{1,2,3,4},{1,2,3,4}}; int maindiag=0;int rightdiag=0; for(int i=0;i<4;i++) { for(int j=0;j<4;j++) { if(i==j) { maindiag=maindiag+arr[i][j]; } } } System.out.println("The sum of the main diagonal …

Member Avatar for sneha_07
0
952
Member Avatar for zendet

Hello I need to figure this out, I tried if ((Fire = 0) || (Water = 0) || (Air = 0) || (Earth = 0)) { System.out.println("Hello"); } But the compiler says I cant use && for ints, I need to get a value for each variable and have certain …

Member Avatar for thines01
0
90
Member Avatar for johnpt

Hi, Below line of code in my program is priting Date & Time in the format [B]11/3/11 4:33:13 PM IST[/B] , how can i print only the lines which are between spcific dates by using the above printed date format in JAVA. System.out.println("Date & time: " + akarray.getModifiedTime());

Member Avatar for NormR1
0
103
Member Avatar for canarian

Hello! I have size about 200*250 icon for my simple application. I need to put it inside on frame as (about) 40*40 size. But when i try everything (image icon, icon for JLabel...) but i could not re-size it inside on JFreme. I f i set the size as 40*40, …

Member Avatar for mKorbel
0
617
Member Avatar for Sbing

I cant figure out how to fix the "public class Triangle implements Measurable" i dont know what i am doing wrong to get this error.. i am not fluent in java but i never had this error before. i tried changing the name but in the process i get more …

Member Avatar for Sbing
0
159
Member Avatar for aanders5

Okay, so I did this not too long ago but I forgot the exact the procedure. Now, I think I was doing it all right after I set it up for Web Start, but when I went to Clean and Build to generate the files needed for online, I got …

Member Avatar for aanders5
0
202
Member Avatar for n1_razz11

hey i am currently working with java to do assignment. i dont know how to call form from menubar to open new form,,, so anyone can help......

Member Avatar for JamesCherrill
0
268
Member Avatar for TheComputerGuy

Just want to be clear, this is practice, not homework. I'm attempting to understand this a bit better...but I'm a bit lost as what to use for my test...and what exactly will help me get to the base case. Here is what I have so far [CODE] public class int …

Member Avatar for JamesCherrill
0
2K
Member Avatar for geekman89

Hello I need help with a program I want to make a method that takes a String and uses the text in that String to use a method from an object. Something like this: public void doThat(String text) { myObject.text();// Where text is the actual text stored in the String …

Member Avatar for JamesCherrill
0
187
Member Avatar for onyx112

So I'm trying to create a program that will take values from one array and multiply them with the values in the second array and then allocate the answer into a third array, then returning that array as a result [code]import java.util.Arrays; public class ArrayCreator { public static void main( …

Member Avatar for JamesCherrill
0
121
Member Avatar for apcxpc

'ellos So I'm making a Hangman game, and for the sake of completeness I want to have a HELP feature. When the Help button is clicked, a browser window should open up (not *within* the game frame... but just generally) and display the HTML Help file. How do I do …

Member Avatar for masijade
0
722
Member Avatar for dennysimon

hello all using ComboBox has it own backward,if the Item are too much ,then the combobox will become very tall (when it call) the other way is using textfield.Which will show selection ,only the items which have the same fist item's Letter with the one we type in. The question …

Member Avatar for dennysimon
0
84
Member Avatar for begprogram

i have to create a DigitsDisplay application that prompts the user for a non negative integer and then displays each digit on a separate line like such "Enter a positive integer: 789 7 8 9 this is what i have so far Can someone please help me fix this program …

Member Avatar for adarshcu
0
149
Member Avatar for je5ter461

below is my current code for a math game i'm having problems creating the answer checking part of it, any assistance is appreciated. [code] import javax.swing.*; import java.util.Random; import java.awt.Button; import java.awt.Color; import java.awt.Dimension; import java.awt.Event; import java.awt.event.*; import javax.swing.*; public class MathPanel extends JPanel { // Declares Labels and …

Member Avatar for je5ter461
0
205
Member Avatar for jackmaverick1

For some reason the file that I input into my GUI isn't being found by Java even though windows explorer finds it just fine. If you'd like to see a specific part of the code, just ask! Thanks in advance, Jack

Member Avatar for jackmaverick1
0
9K
Member Avatar for DaniwebOS

Originally I had the program all in main but I wanted to separate this by having the comparison method (diamond of asterisks) in its own method. For some odd reason I'm getting weird errors that won't allow the program to run. Errors below: 1) Systan error on token "," delete …

Member Avatar for DaniwebOS
0
297
Member Avatar for mehnihma

My question is ; how to take a value from a loop and continue the loop and take the new value again, print it and add it to the old one? thanks [CODE] while (numCourses <= 3) // loop 1 times { System.out.print( "Enter grade (one character): " ); // …

Member Avatar for thines01
0
115
Member Avatar for revjim44

I'm new to Java (2 weeks) and was given a class assignment to create a program that takes a 5 digit number and checks to see if it is a palindrome (same forwards as backwards.) The requirement stated to use the methods main(), retrieveInput(), check(), and display(). My code works …

Member Avatar for hfx642
0
217
Member Avatar for caswimmer2011

Hey, I am having trouble compiling in netbeans. When I go to compile, I usually go to Run>Clean and Build Main Project (or shift F11). When it compilies, it says Copying 1 file to /Users/me/NetBeansProjects/JavaApplication11/build Nothing to copy. And when I go to run the .jar file, it doesn't open …

Member Avatar for caswimmer2011
0
369
Member Avatar for Majestics

I am working on packet analyzing software, so i just need a kick to start by reading the packets of wireless, but i dont have any idea regarding to it... Any who handled such kinds of projects before please help me a bit....

Member Avatar for joehms22
0
110
Member Avatar for ceptic

basically i have a online game underway all php based what i am trying to do is create a client which the user can download and basically run the game from there desktop. the site runs mysql latest version. but what i really want to know how to do is …

Member Avatar for joehms22
0
90
Member Avatar for thorin

I am new to JSP and I am not very familiar with what its advantages and disadvantages are. We all know that Java is a big and complicated language, but it's not as web oriented as PHP. I have also heard that it's more expensive to find a server for …

Member Avatar for peter_budo
0
155
Member Avatar for Ibanez1942

I have a java code that i don't know what is the problem. could you help me? On"Stock testStock = new Stock();" I get an error message that says " Stockcannot be resolved to a type." import java.util.Scanner; /** An application class to test Stock class */ public class StockTesting …

Member Avatar for Anyday
0
340

The End.