32,199 Topics
| |
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 … | |
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 … | |
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 | |
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 … | |
| 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): " ); // … |
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 … | |
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 … | |
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.... | |
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 … | |
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 … | |
hello all how is the code to move the cursor from textfield1 to textfield2 right after key "enter" pressed ? thank you denny | |
Hello! I am writing a java program. This application will work on very slow computers too. 1) My application prints on the command line logs about what action did the user. Sometimes one action needs to write 50 lines on command line. Sometimes 2-3 lines... But these 50 lines are … | |
Hello there Daniweb community, i am creating a 2d game in Java, however i have a problem. I googled up KeyListeners for JFrame, as they didnt work as usual, and i found out that when using KeyListeners with JFrame you have to set focus, right? Well. I have Googled abit … | |
When I am trying to create Stateless Session Bean in Eclipse the finish button is not working(is not highlighted). Please find picture attached. Anybody knows why ? I tried many different options, looks like bug in eclipse. I showed that to friend of mine who is experienced ejb programmer and … | |
Hii all, I have an assignment in my java course and i just did the required 1 , and the else is very confusing for me , I'll be very appreciate if any one could help me for 2nd required and then ill try again in the rest . <URL … | |
Hey guys, I have been having a problem with converting an interger into string for input purposes. For example, I am trying to make it so when the user inputs his/her name and it is an integer the program will not accept it. The IBIO file is the input method … | |
Hi! I'm looking for a way to make an application (app1), separate from another java application (app2), that can acces the GUI of app2 and also listen to all events that are passed to app2. I would like to be able to get hold of the frame of app2 so … | |
HI I was wondering what is wrong with this piece of code as it compiles but then it prints java.lang.null exception in the terminal. and it prompts the red line. I am basically trying to create a ticketoffice class that would store information of 3 users who are only allowed … | |
how do you write the "go to" command in java? like a command that allows me to go back to a previous part of the program and rerun the program in a loop? | |
I am doing a project in class for computer science. I have to make a hangman game that consists of the following: Get the words from a file and pull in the next word after each game, display the word as dashes for the user to guess, prompt the user … | |
Hi everyone, I'm a fairly new Java student and I need some help regarding subclass. This is what I'm trying to do: Basically, I created a Superclass called Person, and from it I created a subclass called CollegeMember. Now, I need to divide the CollegeMember subclass to "Lecturer", "Student" and … | |
hi, how do you get the html file to run the java applet in a webbrowser. I need to have a html file which will allow me to view this applet in a web browser. im using eclipse to write the code for the applet. [CODE] import java.awt.Graphics; import javax.swing.JApplet; … | |
I want to start develop software in both Java and C++. I am previously develop app for website so I am really not familiar with desktop programming. If we do code in Java, I believe we need a development tool with GUI so which one is the widely use nowadays? … | |
Hello Everybody ! i have a few questions for u I have already made an appointment booking website on PHP using PHP Designer as editor and on WAMP platform, i run it on localhost. The website consults Database and puts forward the times available and lets users fix appointments and … | |
think of a number and allow the user to guess it [code]import java.util.*; public class ThinkNumber { public static void main (String args[]) { //generate number in range 1 - 100 //prompt user to enter guess //loop until correct number is guessed //check guess and output hint //guess is correct … | |
Hi all, here's a kinda bullet-pointy explanation of what i have - I have a simple JFrame - I create a JPanel called 'ContentPane' [CODE]contentPane = new JPanel(); contentPane.setBackground(SystemColor.window); contentPane.setBorder(new LineBorder(SystemColor.inactiveCaption)); contentPane.setLayout(null); setContentPane(contentPane);[/CODE] - the JFrame has a [CODE]JMenuBar -> JMenuBar -> JMenuItem[/CODE] - The JMenuItem has a MouseListener and … | |
Hello everybody. I am in need of an answer. How can I use the text from a string and use it as a variable's name? For example: I have an array: int xyz[] = new int[5]; And say I want to check if it's name is the same as a … | |
Hello! I need to ask password to user, to get administration rights for my java application when it works under linux (or any POSIX). Can someone help me about that? Thank you! | |
Hello; I have a following method that allocates memory for some objects. [CODE] public static int formStyleOfLyle(int a) { ObjectL[] numberL = new ObjectL[a]; if(numberL==null) { return -1; } return 0; } [/CODE] I really dont know what this does; but I need to check the return value of this … | |
My program receives no errors or run time errors, but for some reason it runs infinitely. I need help pinpointing the problem D: I will post additional information about the exercise I am trying to solve in this thread. [CODE] package captcrunch; /** * * @author Josh */ public class … |
The End.