32,199 Topics

Member Avatar for
Member Avatar for Valiantangel

can anyone see my error? error output error: ';' expected System.out.println((GoldFish)owner.pets[ 9 ]).getAction("*Rat eats alot*" )); ^ owner.pets[ 9 ] = new GoldFish(); Pet BlackMoor = owner.pets[ 9 ]; System.out.println((GoldFish)owner.pets[ 9 ]).getAction("*Rat eats alot*" ));

Member Avatar for michelleradu
0
55
Member Avatar for raviaaaa

Hi All can you pleased help me how to resolve applet load fail in IT link applet loading fine, but when i used same code and made a local setup while runnning applet is not loading please see the stack trace and com.scand.jtree classes are exists under applet folder under …

Member Avatar for NormR1
0
312
Member Avatar for shawnv100

I need to develop a program in Java which will launch an integrated or USB webcam and capture a video recording for a specified time....i looked through the net, but I couldn't get the code to work...I have the JMF files....can anyone please tell me how its done, or if …

0
50
Member Avatar for shawnv100

I am trying to use Java to detect signals from the serial port sent from an IR circuit. When the IR circuit detects an obstacle, it gives an output of 0 volts and otherwise the output is 5 volts. Can I read these voltage differences directly on the PC using …

Member Avatar for shawnv100
0
262
Member Avatar for lotto91

Hi, Im been working with a project now, and have got stuck. Cant see what im doing wrong. Im supposed to make a Digital Thermometer. Right now im stuck on passing values from one class to another, been trying to use get methods.It seems like the value I get is …

Member Avatar for lotto91
0
79
Member Avatar for jamesr12

I know this seems to be a very basic questions but still want to clear my basic knowledge so i am asking this question What is String Pool in java? what is difference between String var="DANIWEB; and String var =new String("DANIWEB");

Member Avatar for jamesr12
0
144
Member Avatar for sugir1987
Member Avatar for kubiak

`Inline Code Example Here` class MainMenu extends JPanel { public MainMenu() { this.setLayout(null); JButton newGame = new JButton("New Game"); JButton loadGame = new JButton("Load Game"); JButton scoreGame = new JButton("High Score"); JButton exitGame = new JButton("Exit Game"); this.add(newGame); newGame.setBackground(Color.white); newGame.setPreferredSize(new Dimension(180, 50)); newGame.setFont(new Font("Fixedsys", 1, 25)); this.add(loadGame); loadGame.setBackground(Color.white); loadGame.setPreferredSize(new Dimension(180, …

Member Avatar for zeroliken
0
219
Member Avatar for TheFlyingOwl

I am making a java gui keyboard as practice The keyboard itself works well and is made out of JButtons It changes colors when a certain key is pressed and then releseased I have two questions: Is there a simple way to listen for tab being pressed? Is there a …

Member Avatar for NormR1
0
295
Member Avatar for fatzky_04

Hello. I'm new to Java. I created 4 CHOICE that has 9 numbers. It should convert the selected item into words in the text area. I don't have any idea how to do it. Please Help. Here's my code. import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; public class Final1 …

Member Avatar for fatzky_04
0
316
Member Avatar for Shakeylfc

Hi, Basically im looking to create a simple application that takes in an instruction from the console. The instruction includes the width and length of a grid (x,y), the starting location of a car (x,y on grid), and the instruction to move about on the grid. Essentially an instruction shall …

Member Avatar for javalover
0
99
Member Avatar for NormR1

How do you wrap code in tags. This OP had a problem doing it: See http://www.daniweb.com/software-development/java/threads/418944/choice-and-text-area-convert-number-to-word `String var = null; forIint i etc // end`

Member Avatar for Dani
0
134
Member Avatar for picogenkaku

I have a question. How can I run a process while a timer is running in the program. Here's a sample layout of what I mean. Or is it possible to have this kind of layout? ![layout_in_cmd1](/attachments/large/3/layout_in_cmd1.jpg "layout_in_cmd1") I have already the timer method.

0
48
Member Avatar for Valiantangel

My only issue here is i am not able to invoke line 41 owner.pets[ 3 ].getAction();? Any ideas why? `Inline Code Example Here` abstract class Pet1 { abstract void perform(); } class Dog extends Pet { void perform() { System.out.println("*The dog rolls over*"); } } class GoldFish extends Pet{ void …

Member Avatar for JamesCherrill
0
112
Member Avatar for vijiraghs

The following is my RDF file structure. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > <rdf:Description rdf:about="http://www.wordpress.com/blogs/ckj"> <rdf:subject>Data structures</rdf:subject> <rdf:object>vijayalakshmi</rdf:object> <rdf:value>kjhjk</rdf:value> </rdf:Description> </rdf:RDF> I want to write a piece of java code that can * read the value of <rdf:subject> <rdf:object> into a model inside a java program. How should I do this?? I am …

Member Avatar for NormR1
0
171
Member Avatar for Ralphael

I am cresting a digital clock and I am having troubles updating the interface please can someone help me with this. I have the code below: ********/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package Interface; /** * * …

Member Avatar for NormR1
0
642
Member Avatar for Valiantangel

Hi My issue is i cant get the arrys correct,with abstract class.Can some one highlight to me the error in class Example1.I want to create 2 extra pets (iguana & hamster) but i am getting it wrong. below are the errors from my complier 23.java:37: error: constructor GoldFish in class …

Member Avatar for zeroliken
0
148
Member Avatar for Valiantangel

hi, i read through a few website ,gone through a few examplebut i am still getting 01 error in my code? Error message: goldFish.java:11: error: cannot find symbol void perform(){System.out.printIn(this.action); ^ symbol: method printIn(String) location: variable out of type PrintStream 1 error abstract class Pet { abstract void perform(); } …

Member Avatar for JamesCherrill
0
155
Member Avatar for devninja

I made a custom JTextField that only accepts numbers into the textfield. I used insertString to do this. Tt works pretty well except it allows oddly only the letter e. It accept e only after a number is inputted first. And once e has been entered the textfield does not …

Member Avatar for devninja
0
449
Member Avatar for CLynn

Hello, I am writing a simple program for my Java class and I keep getting this annoying error that after reading the code over and over again, I just can't see where the error is originating from. Anything obvious sticking out? Here is the error: Exception in thread "main" java.util.InputMismatchException …

Member Avatar for zeroliken
0
175
Member Avatar for anand01

hi all , I develpoed java application i java swingss, I need tocreate two versions linced version and trail version, Trail version should experied in 20 days,once user gives the serieal key the application shold work , where shold I store registration key, How could I protect my application could …

Member Avatar for anand01
0
330
Member Avatar for tleverington1

Hi all, I have a slight problem when checking if a "Token" is in my StringTokenizer string. My code: import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.lang.String.*; import java.util.*; public class TextAnalyser { public static void main( String args ) { StringTokenizer stringTokenizer = new StringTokenizer("You are tokenizing string"); System.out.println("The …

Member Avatar for NormR1
0
98
Member Avatar for aanders5

Okay, I am going to go through ALL my steps thus far just so that this process can be sped up hopefully. I have done this before, but it was awhile back and I forgot how, but I know it is possible. 1. I made a Neatbeans created Java Application. …

Member Avatar for NormR1
0
560
Member Avatar for manishanibhwani

hello everyone, I am developing an application for my project... My application works correctly when I run it on applet viewer...But when i try to run it with the help of html page ..the code does not run and gives an erron java.security.accessdenied exception.... Actually i have loaded an image …

Member Avatar for manishanibhwani
0
155
Member Avatar for Ordella

As I mentioned in an earlier post of mine that I have my computer exam on th 26th March 2012.. So I was just wondering if anyone could provide me with some programming questions for my school level which I could practice on my own. If anyone is posting me …

Member Avatar for stultuske
0
108
Member Avatar for sadzee

**Hey, Hi all! I'm a bachelor student, new to Java. Following code is giving error in PrintDetails() What parameters should I define in it?? Kindly check and tag out my mistakes in the following code.. Thanks ^_^** class student { String a;String b;char c;double d; student(String name,String rollno,char gender,double gpa) …

Member Avatar for NormR1
0
103
Member Avatar for Ordella

Could anyone tell where is the error in the program? There is a compile-time error... When I hit compile it shows error in the 40th line saying that 'r' might not have been initialised.. I can't get that.. Pease could anybody help?? import java.util.Scanner; public class Customer_Account { public static …

Member Avatar for Ordella
0
102
Member Avatar for mehnihma

I need to take arguments and change the extensio of the file for writting but I get java.lang.ArrayIndexOutOfBoundsException: 1 Why? Is there any better way? // change file name for saving the output file int dot = inputFile.lastIndexOf('.'); // check for the dot String baseName = (dot == -1) ? …

Member Avatar for mehnihma
0
181
Member Avatar for fatooma92

Open the project space in greenfoot and study the codes of the classes Space and Asteroid. 2. Modify the constructor so that the space world paints 300 stars. To paint a star you write the following code: GreenfootImage star = getBackground(); star.setColor(Color.WHITE); star.drawOval(50,50,2,2); this will draw a small white star …

Member Avatar for stultuske
0
218
Member Avatar for zAxOanL

Hi. I have problem adding text box after each label ID Code, Weight, Rate, Price Charge, it does not show when i run the code. Also, how do i add the $ sign when display the price charge. the ouput should be like this: Fee Calculator ID Code: [Text Box] …

Member Avatar for stultuske
0
425

The End.