32,204 Topics

Member Avatar for
Member Avatar for ROSS679

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 …

Member Avatar for ROSS679
0
193
Member Avatar for chipsch

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[] …

Member Avatar for chipsch
0
174
Member Avatar for stroper

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 …

Member Avatar for mangopearapples
0
307
Member Avatar for rohit2

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....

Member Avatar for naief
0
88
Member Avatar for maipelo

what are the reasons for creating a website using java technology and how does this technology ensures security of the website

Member Avatar for mangopearapples
0
75
Member Avatar for stroper

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? …

Member Avatar for stroper
0
468
Member Avatar for xshinichix

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 …

Member Avatar for jon.kiparsky
0
188
Member Avatar for palamonin

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-

Member Avatar for jon.kiparsky
0
51
Member Avatar for rohit2

I am using a Jtextpane in my application. I want to add line number in it. How can I do it. please help....

0
68
Member Avatar for clairvoyance

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] …

Member Avatar for -ordi-
0
188
Member Avatar for kained

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 …

Member Avatar for kained
0
159
Member Avatar for pradeesh.login

define briefly about DTW algorithm for voice recongnition also how to implement java speech api in netbeans????????????????????????????????????

0
52
Member Avatar for hanslim77

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 …

Member Avatar for stultuske
0
300
Member Avatar for xshinichix

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 …

Member Avatar for masijade
0
1K
Member Avatar for I<LateNupurGuha

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 …

-2
59
Member Avatar for stephy1

In which package is Grid(in-built) class is there? I guess util. But Grid creation using create() shows error.

Member Avatar for stephy1
0
107
Member Avatar for shakssage

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 …

Member Avatar for shivam7
0
247
Member Avatar for stephy1

i have a codelike this: [CODE] do { int i; }while(i!=0); [/CODE] Shows error "Cannot find symbol i"

Member Avatar for masijade
0
108
Member Avatar for ncstplaya1234

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 …

Member Avatar for insanely_sane
0
83
Member Avatar for enterpise

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. …

0
44
Member Avatar for rohit2

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 …

0
68
Member Avatar for privatestatic

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 …

Member Avatar for JKP()
0
962
Member Avatar for techie929

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.

0
58
Member Avatar for ToXSiK

[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 …

0
66
Member Avatar for jemz

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 …

Member Avatar for jemz
0
282
Member Avatar for hallinan

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 …

Member Avatar for emilo35
0
374
Member Avatar for cretaros

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 …

0
79
Member Avatar for kodera

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 …

Member Avatar for Akill10
0
915
Member Avatar for sateal8

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 …

Member Avatar for Akill10
0
215
Member Avatar for ToXSiK

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 …

0
51

The End.