32,204 Topics
| |
Ok I have done the main section of my MergeSort program. I have to accept 10 integers and put them into a list. I having trouble with inserting user input into a list. Can anyone help? [CODE]import java.util.Scanner; import java.util.LinkedList; import java.util.*; public class mergesort{ public static class lp{ int … | |
i am trying to make a program that takes an object oriented approach to calculating the miles per gallon that your car gets. this is early in the process an i am aware that alot of stuff is missing. i am just trying to get it to work enough that … | |
Heya guys. I'm having a real problem with one of the examples on my java homework and was hoping one of you guys/gals could help. I need to write a program that allows the input of five numbers. Then the final output line(s) need to say which is the highest … | |
I have to write a program that diaplys a tic tac toe board with random x's and o's. I have having severe issues with the random part. I also dont know what to put for arguments in the JButton methods, but I think my issues are realted. Any and all … | |
Does someone have the solution for this? I know this isn't homework serice I have no idea where to start off....... I don't want a game of life applet, just simple codes that can compile and run. pm, post if you do. thanks so much. Can someone help me make … | |
I am thinking of developing a video conferencing system with multicast support....After some research I have decided to use java to develop this system with the aid of JMF. Has anyone developed a system like this, or could provide me with some useful links or information. Any help would be … | |
I am trying to create a 2d array list but it is giving me a compiler error pointing at the first line of the function. I don't really get what is causing the problem. I am pretty good in C++ but Java has some new rules that I am trying … | |
Hey guys I'm a bit confused here as I haven't edited a renderer before. My situation is that I have a custom object that I have created. It has a few jLabels, textboxes, and a combo box. And what I'm wanting to do it make it display on a jList. … | |
Hello I am new to java or well mainly everything. I am making a 'General Knowledge' game for a school project, I have a timer down and the questions. But I would like to know if there is a code I will be able to use to make points, for … | |
Hi.. I have 3 JPanels. (one) JPanel contains the scrollpane and the (two) JPanel contains a JButton. I am adding (one) + (two) into (combine) JPanel and then adding to the frame.Now I am really having a hard time align the scrollpane and the Jbutton. scroll pane is coming squeezed … | |
Good morning, all! I have a Java project that is complete, but it's not due for another week. I've been poking around trying to "spruce it up" a little with maybe a pull-down menu for one of the options. The examples I've found online all deal with web development. Will … | |
Hi Can anyone please tell me whether I can write a java program and start it in a way other that involves the command line? And not applets either. I want to start writting all of our company software in java, leaving behind c#. But the problem is I can … | |
hi to everybody. I'm just wonderin' if someone can help me with arrays. I am making a program of computing an average grade. I manage to execute the first requirements. The problem i have is how can i compute the grades that had been entered using a seperate method here … | |
How can I limit the length of a text field.. I want allow entering specific number of characters in the text field?? Is there a constructor... I couldn't find 1.. plz help... | |
Hi there, I'm attempting to write a program that does the target word puzzles you see in most major newspapers. The target word problem involves a 3x3 grid of 9 random letters that a user needs to be able to make words out of using at least the middle letter … | |
Hi guys, Just wondering if someone could help point out why the string value s1 in the for loop cannot be passed on to String input.... here is my code. Please ignore the commented out parts. Cheers for any help [CODE]import java.io.*; import java.util.*; import java.lang.*; public class gaelan3 { … | |
Ok, well I am JUST beginning to learn Java, and I have run into a little stumbling block. I am attempting to write a little applet, but it doesn't seem to want to run. My Java code: [code=java] import java.awt.*; import java.applet.*; public class TestApplet extends Applet { public void … | |
I've run into a few problems with this one. I've tried my best following the directions. I can't figure out how to properly use "switch" since we haven't really put it to use in class. I want to create random integers (this I know how to do) that will become … | |
Hi Guys, I have a compiled java file example.class and i need to use the methods in this file to read from a text file. I need to have this file inside my package as requested by the teacher. However when i put the example.class file into my package and … | |
Hi I am trying to create a method that will substitute a value x with a value y in a basic array. Your assistance is much appreciated! Yeungn | |
Need to take input from a file as command line argument and put it in an array, but i keep getting .class expected on this line [CODE]temp[][] = infile.nextInt();[/CODE] Here is the whole code so far for reference [CODE]import java.util.*; class Temps { public static void main(String[] args) { Scanner … | |
I have created a JApplet and I want to be able to clear the screen and draw new components depending on what button I click on. Right now the code below will clear the screen but it doesn't redraw the JTextFields (label_1 & label_2). However I did notice whenever I … | |
Working on a project that is basically a simple bowling program that uses a gui to read in from a given text file a pre-determined amount of names and scores...runs through the standard 10 frame scoring system, prints out the score, and who won. Now I can't seem to get … | |
Ok so im building a level editor for this game. What the code i cant working does is, when the button is clicked it should get the selected cell from the jtable and set a value for it. However, for some reason I cannont get it working. Here is the … | |
[CODE]public String expandTemplateTopic(String remark) { String random_word = findKeyWord(remark); String str=" "; String kok2=" "; int num1=0; int num2=0; int num3=0; //find a random template int number = generator.nextInt(sentenceList.size()); String argument=sentenceList.get(number).getTemplate(); //split it into words using space as delimiter List ls=new LinkedList(); String[] array =argument.split (" "); //find if there … | |
hello friends, I am doing my project on above topic and I am trying it with Java. Is it possible doing it in Java. What Techniques I'm using are: 1.Java(JMF) 2.Oracle 9i(Inter-Media) 3.Matlab This project concludes of four parts 1.Segmentation (Video to Image conversion) 2.Comparison (Copare frame using algo.) 3.Extraction … | |
I'm having Java course and I have to submit the following programs by the coming Wednesday for what I am not skilled enough till now. Please may you code those for me for this time? PART 1 P1. Write a java program to calculate the roots of a quadratic equation … | |
Default spring problem i want to create database table automatically using spring ,what can i do? | |
I want to help me to Write a program which will draw an “X” shape as shown in the figure below. Your program must consist of one class named “Picture”. In your main method you must declare and initialize some String variables which you will later use in a print … | |
I'm having problems with java not correctly waiting for a method to finish before continueing. I have a sound file that lasts an unknown amount of time and I want to set lengthS to that time, I do this by taking the System's current time in milliseconds before and after … |
The End.