31,001 Topics

Member Avatar for
Member Avatar for maverick420

> I'm implementation polymorphism and have one confusing that if I use instanceof then I'm trying to perform casting which voids polymorphism so will that be any way to avoid instanceof with the code and still have the program working? Block of code where I have used instanceof starts from …

Member Avatar for maverick420
0
207
Member Avatar for thesmile

i want code for NotePad in java language ^_^ plz help me its Mark by 25 plzzzz

Member Avatar for DavidKroukamp
-1
100
Member Avatar for v3ga

I have a JLabel and a JPanel which both implements MouseClicked methods and I have added the JLabel to the JPanel but when the JLabel is clicked, the MouseClicked method of JPanel is invoked. How to fix this>??

Member Avatar for v3ga
0
155
Member Avatar for dhija22

Hi Im am bigginer in java and i want to know :If a,b are variables of integer type and S1,S2 are variables of Student,what does mean a=b, si=s2. Is any change in way how the value pass in these examples?? I am waiting for a response best regards Eda

Member Avatar for ash.28.88
0
125
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 ash.28.88
0
189
Member Avatar for OldDeveloper01

I have this printed "ljava.lang.string;@40585b18" instead of a vlaue from the string array called answers. At the moment i am not pick really as to what is pritned out. Just get the app to display something meaningfull from the array will be a good place to start right now. The …

Member Avatar for peter_budo
0
127
Member Avatar for Samama

provide a set of PC-based tools and utilities to organize historical performance data from an OpenVMS system. Purpose of System Synopsis To capture and maintain a history of variables directly affecting the performance of the VMS production systems. Then provide a graphic interpretation of that data to allow for trending …

Member Avatar for stultuske
0
110
Member Avatar for JerBear24

What I'm supposed to do: Rewrite the class below, so that it throws appropriate exceptions instead of returning -1 as an error code. Write test code that attempts to withdraw and deposit invalid amounts and catches the exceptions that are thrown. Original code: class Account { private double balance; public …

Member Avatar for DavidKroukamp
0
380
Member Avatar for Zaad

Hi techies got a small problem a swin related one... I found a similar article here [Click Here](http://www.daniweb.com/software-development/java/threads/89427/how-to-programatically-select-a-cell-in-a-jtree) But seems no answer for that in that particular thread in this forum. Since that is a very old thread thought it would be right to put in my question as a …

1
62
Member Avatar for blake81

Need help with just a couple of minor errors. for the lab I am currently doing I have 2 service/class (no clients or application classes). these are my errors Car2.java:138: error: not a statement Cars D = (Car2) car ^ Car2.java:138: error: ';' expected Cars D = (Car2) car Can …

Member Avatar for zeroliken
0
172
Member Avatar for simplyflawless

The class contains: - Two double data fields named width and height that specify the width and height of the rectangle. The default values are 1 for both width and height. - A string data field named color that specifies the color of a rectangle. Hypothetically, assume that all rectangles …

Member Avatar for DanOath
0
22K
Member Avatar for c.pentasuglia

So i'm working on a java program that will eventually be used like a library on an EIS system. My next step is to work with the resource adapter, and i've never done anything like this before. I understand the architecture in this case and what the resource adapter does, …

0
126
Member Avatar for c.pentasuglia

In a nutshell i have a java program that takes parameters from an XML file. I made a .jar file from my java project. Within the java project i have the XML file set to a static directory, i'd like to be able to change that so the jar would …

Member Avatar for c.pentasuglia
0
240
Member Avatar for tleverington1

Hello all, I am having problems setting up a connection with a mysql database that i'm going to need to use for one of my projects. My code to establish the connection is as follows: import java.sql.*; import java.sql.Connection; import java.sql.SQLException; import java.sql.ResultSet; import javax.sql.ConnectionEvent; import java.sql.DriverManager; public class SQL …

Member Avatar for tleverington1
0
157
Member Avatar for Kert

I need to make a checkers board that has to be also resizeable. At the moment I'm using JPanel and it's method paintComponent to paint the squares. But the problem is with the class test: the squares drawn have to be squares and they cant go out of proportion, so …

Member Avatar for Kert
0
185
Member Avatar for memz

help me in this code .. it is not work .. public static void CreateFile() throws IOException { File f; f = new File("myfile.bat"); if (!f.exists()) { f.createNewFile(); System.out.println("New file \"myfile.bat\"has been created"); } } public static void getFiles(String path) { File dir = new File(path); String[] children = dir.list(); …

Member Avatar for memz
-1
304
Member Avatar for blake81

The major issue I am having right now is my client class cannot run/compile, I tried different methods to fix it from calling it from overload constructor and setScores but neither work. Scoresclient.java:16: error: cannot find symbol myScores.setScores(); ^ symbol: method setScores() location: variable myScores of type Scanner Scoresclient.java:18: error: …

Member Avatar for NormR1
0
172
Member Avatar for Traps

I'm trying to create a jUnit test for my EJB's and if my app just contains a few beans everything's all good but as soon as I incorporate JPA and entity-classes my jUnit test blows up. My test fails at ejbContainer = javax.ejb.embeddable.EJBContainer.createEJBContainer(); and the stack trace says the following: …

Member Avatar for Traps
0
479
Member Avatar for Tuz

I have this two classes and its giving me an error when i compile it that cannot access BaseClass. package pckage1; class BaseClass { public int x = 10; private int y = 10; protected int z = 10; int a = 10; //Implicit Default Access Modifier public int getX() …

Member Avatar for NormR1
0
89
Member Avatar for Yozuru

So I have a programming lab that we did in class for a few months but I am having major difficulity on it. These are the directions: > Specifications for Calculate grades using loops 1. Create pseudo code for your program first, to be handed in. 2. Make the program …

Member Avatar for FelineHazard
0
1K
Member Avatar for Bugaya

I am trying to use JQuery Full Calendar along with Spring MVC. I have made a demo like [that][1]. Target: I need to send the UPDATED calendar's data,after I enter my events, to the controller to handle it. Issue: I've succeded to re-send the calendar I've inistialzed to the controller. …

Member Avatar for Bugaya
0
463
Member Avatar for Bugaya

I am trying to use JQuery Full Calendar along with Spring MVC. I have made a demo like [that][1]. Target: I need to send the UPDATED calendar's data,after I enter my events, to the controller to handle it. Issue: I've succeded to re-send the calendar I've inistialzed to the controller. …

Member Avatar for Bugaya
0
199
Member Avatar for mags11

I have a program that uses a Payroll class that uses the following arrays as fields: employeeID.- an array of seven integers to hold employee identification numbers. The array should be initialized with the following numbers: 5658845 4520125 7895122 8777541 8451277 1302850 7580489 hours.- An array of seven integers to …

Member Avatar for stultuske
0
1K
Member Avatar for rob211

Hi! How can I implement the folowing: ABC = BCA - true BAC = CAB - true DAB = BCA - false if (((1 == 1) && (2 == 2) && (3==3)) || ((1==2)&&(2==1)&&(3==3)) || ..... ) return true; That cannot be the fastest way, right?? And how can I …

Member Avatar for stultuske
0
127
Member Avatar for justindill

package now; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; public class Now extends JFrame { JLabel FirstName; JTextField jtfFirstName; JLabel LastName; JTextField jtfLastName; JLabel Age; JTextField jtfAge; public Now(){ //Set FlowLayout setLayout(new FlowLayout(FlowLayout.LEFT, 10, 20)); //Add labels and text fields to the frame add (new JLabel("First Name")); add (new …

Member Avatar for justindill
0
3K
Member Avatar for ilovejava

So I want to parse a .dae collada file which is stored xml. Now to parse the file should I use the SAX or DOM parser. THe file size of the collada file ranges from 200kb-40mb files. Is the file too large for a DOM parser?

0
77
Member Avatar for koricha

the web app is a simple calculator that adds and subtracts. my problem is that the add and the subtract buttons don't work i get an error message: "An error occurred at line: 19 in the jsp file: /adder.jsp Invalid character constant" <% String name = (String) session.getAttribute("name"); if (name==null) …

Member Avatar for koricha
0
430
Member Avatar for 3nrichedd

Im making this program that reads in a java file and creates a new file with a formatted version of the file. Basically every place there is a { open braces, I want to add 4 spaces to each lines after that etc.. Here is what I have so far.. …

Member Avatar for NormR1
0
217
Member Avatar for Zilna

I have been messing with this for 2 days now and for some reason my image will not show up. I have tried to move the code around to varying locations just to see if I am just placing it in the wrong area but nothing seems to work. /* …

Member Avatar for NormR1
0
196
Member Avatar for Bladtman242

When i use this code from another class (I'll post the client if necessary, but in the interest of making a short post:) I get an ArrayStoreException from line 31. As I see it: the array is of runtime-type V, the item that should be added to the array should …

Member Avatar for Bladtman242
0
185

The End.