32,204 Topics
| |
Hi Everyone I have been hard at work on this Java program involving bicycle gears, one of the problems is the while loop, should a user enter a negative number in the inputs then i want the user to re enter it until a positive number comes up however the … | |
So this is what i am trying to do. Create just a 5 element array and using the scanner utility get some information from the user that can then be passed down to an object that is dynamically created by the array. The object requires paramaters due to constructors. [CODE]Employee[] … | |
hy everyone, I have a problem, I am making a little program for a game; When I start my game the timer has to start counting and after 3 minutes the game has to stop. I need to know a way to program a very simple counter/timer in order to … | |
I am using a Jtextpane in my application. I want to switch to line number I want . How can I implement Goto line feature in java for jTextpane. please help.... | |
what are the reasons for creating a website using java technology and how does this technology ensures security of the website | |
Hye everyone, I am trying to make a 2d-char array, fill it with random letters(chars) and print it. If I do it like this I get a ArrayIndexOutOfBoundsException: 0. I am a newbee. I import my prefs(width, height) from static getters in the class preferences. Can anyone help me please? … | |
Our teacher gave us an assignment.Can anyone help or give me some idea on how to solve this java problem? im still learning java. Here's the problem: "Write some code to demonstrate to yourself the chain of construction. Create an inheritance hierarchy of 4 classes. Give them any names you … | |
Design program Infix that will convert the expression from infix notation to post fix notation using Stack operation. Observe hierarchy of operators. Sample Input/output Enter infix : 4+6*7-8 Postfix equivalent is 467*+8- | |
I am using a Jtextpane in my application. I want to add line number in it. How can I do it. please help.... | |
Hello, I have a to make a class called fibonacci. This is what is given to us : fibonacci(0)=1 fibonacci(1)=1 fibonacci(n)= fibonacci(n-Â1)+fibonacci(n–2) Below is an example of running the fibonacci class as an input of 6. The output is: fibo(0)=1 fibo(1)=1 fibo(2)=2 fibo(3)=3 fibo(4)=5 fibo(5)=8 fibo(6)=13 [B]My code is:[/B] [CODE] … | |
Hi, I am trying to get a Javascript working in an XSL document and i can't seem to make it work for some reason. I have placed the following code within the head of my document. [CODE] <msxsl:script language="JScript" implements-prefix="user"> <![CDATA[ function popup(mylink, windowname) { if (! window.focus)return true; var … | |
define briefly about DTW algorithm for voice recongnition also how to implement java speech api in netbeans???????????????????????????????????? | |
Other than the usual [CODE]AudioInputStream stream = AudioSystem.getAudioInputStream(ClassLoader.getSystemClassLoader().getResource("____.wav")); DataLine.Info info = new DataLine.Info(Clip.class, stream.getFormat()); Clip clip = (Clip) AudioSystem.getLine(info); clip.open(stream); clip.start();[/CODE] Since the buffer limit is 2mb for an UNCOMPRESSED wav file so... it's pretty obvious how crappy that is... and that's about all I found on the net since … | |
Can anyone help me with this java problem? Here's the problem: "Write some code to demonstrate inheritance polymorphism. Create a superclass class with 3 subclasses. The superclass should have a method that prints out a line identifying the current class (something like "I am a Superhero"). Two of the subclasses … | |
Is there any [I][U]relationship[/U][/I] among the [U][I][B]bounds[/B][/I][/U] of a [B]type [I]parameter[/I][/B] in [B]Generics[/B] i.e. whether they are channeled([B][U]subclass[/U] or [U]superclass[/U][/B]) [U]uniquely[/U] [I]sequencially[/I] or [COLOR="Green"]differently[/COLOR] ? :confused: We use [COLOR="Red"]extends[/COLOR] clause once to inherit some only one class and to inherit others we have to [COLOR="red"]implement[/COLOR]. But for multiple bounds in … | |
In which package is Grid(in-built) class is there? I guess util. But Grid creation using create() shows error. | |
Hello. I'm not really sure on how to explain the problem, but here goes. I'm creating a Traffic Simulator of a cross junction. I currently have car objects moving, with working traffic lights. I created a variable array for the car class which creates several car objects. Then the lane … | |
i have a codelike this: [CODE] do { int i; }while(i!=0); [/CODE] Shows error "Cannot find symbol i" | |
Write a java program to repeatedly get two numbers from the user and display the sum of their squares. User numbers and result are real numbers. Repeat this interactive input/output until the first number exactly matches the sentinel value 990. Do not process the input matching the sentinel value. For … | |
i'm a beginner in coding and i try to write a parking lot program. There are 3 classes in my program. Could anyone help me out ,I got stuck in the record class which is datetime in and out and how to set overtime price. ****sorry about my bad english. … | |
I am developing a tool using java swing. In it I have to read a .vbs file. I have used the following code for it. Scanner fileReader1 = new Scanner(new File(fileName),"US-ASCII"); while (fileReader1.hasNext()) { System.out.println(fileReader1.nextLine()); } where fileName is valid .vbs file path This is working only for .vbs files … | |
hey guys i got this new project for my java class and got the overall idea but my code still does not seem to work ...here are the directions: - make a 5X5 boolean array assign 5 random elements for 5 ships - user can have 15 guesses to find … | |
Hi everyone, I have to read a RGB image and then convert it to YUV. Could any one please tell how should i do this? Thanks. | |
[CODE] private void depositButtonActionPerformed(java.awt.event.ActionEvent evt) { AdminLoginPage adminLogIn = new AdminLoginPage(users.get(accountNumber).userName, "deposit", users.get(accountNumber).balance, Double.parseDouble(depositAmountTextField.getText()), users); adminLogIn.setVisible(true); customUserDetails1.setText("Welcome " + currentUserName + "! You Have $" + (adminLogIn.getBalance()) + " Available."); depositAmountTextField.setText(null); } [/CODE] AdminLoginPage is a JFrame Constructor Class that displays a certain users account information and asks for an … | |
Hell can you help me on this,how can i insert a new node in the binary tree and to keep track the current node example: input number: 50 Succesfully inserted! input number:40 this will print "inserted at the left of 50" input numbr: 80 this will print "inserted at the … | |
Hi, sorry a bout this question but I have no Idea how I would texture something drawn by using glDrawElements? From what I gather you need to use glTexCoordPointer? but I'm still really confused. [CODE] public class DrawWater { public Expr2 func; // The function that is being drawn. private … | |
Help me in correctinf the errror i encounter here, i want the image file i have selected using Jfilechooser to be set on the image panel. i tried this but it failed: picthandler.setImageIcon(file); Here is the class Code , i have commented exaclty whr i want the bug to be … | |
I am a beginner JAVA coder, and yes this is a homework assignment for a online class... I am stumped, and cannot get help fast enough when it is 11pm at night :<) To better explain, I need to be able to have four methods. My first method contains all … | |
I am trying to write this program to get a user inputed number of grades up to 15. I then need to add the grades, find the largest, smallest and average of the grades, and finally display the results. Here is what I have so far. I can get past … | |
Hey everyone, and thanks for taking the time to read my post. Basically, I have a JFrame called "loginPage", that, well, is a login page. If a user logs into this page with the correct credentials, a new JFrame object called accountDetails opens (Or is constructed). Now, Is there a … |
The End.