32,199 Topics

Member Avatar for
Member Avatar for Benjamin_4

I want to create a jTree which when i right click on a node, should give me the options of "rename","add Region(parent)","add City(child)". the name of my jTree is branches As i am new to swing,Could any one help with code. Thanks in Advance. Regards, Sarkwa

Member Avatar for JamesCherrill
0
67
Member Avatar for PaulDel

Hello All, Just looking for code snippets to remove color from jpg image. I would like to remove red, blue, green from a picture, leaving black and white. For instance, imagine a newspaper cartoon with an "X" on the picture. I want to remove the colors leaving the "X". I'd …

Member Avatar for stultuske
0
325
Member Avatar for techyworld

Hi i need help to retrieve data from DB. I am trying to retrieve from database the number of cars that we registered each month in 2013.Based on that i will draw a line chart.so on my x-axis will be cars, and y-axis is number. Note: i have different models …

Member Avatar for masijade
0
201
Member Avatar for ZombieKnight93

I am havin an issue with the findVolume for the sphere part. It seems to ignore the "4/3" part but calculates everything else. Is there a way I can make it include this function? Here is the code: public class Sphere extends threeDShape{ double r; public Sphere(double x, double y, …

Member Avatar for JamesCherrill
0
130
Member Avatar for andrewriebel

Hello, all. I'm creating a program that lets a user play Hangman. I've attached the directions for the program for clarification. My code is pasted below. I've set up a couple methods for it, but I'm having difficulty in understanding how to call these methods in the main class (assuming …

Member Avatar for andrewriebel
0
254
Member Avatar for loody

Hi guys i am new here i want to help about: how to convert digit(number) into word for example: Enter a number:123 Output:one two three

Member Avatar for loody
0
221
Member Avatar for sk8ergirl

Hi, I'm working on my assignment there are two parts of the assignment first part was to create class (ClassOne,ClassTwo,ClassThree,ClassFour,ClassFive) ClassFive extends ClassTwo and ClassTwo is abstract the secod part is to add the iobserver and iSubject , but I don't know how to implemet this part in the UML …

Member Avatar for sk8ergirl
0
160
Member Avatar for you207

Im new to java and I need a little help. I store the usernema, password and name in user.dat file. The user enters his usernema and password , if its a match it prints his name on the screen. If its not a match the user is asked to register-add …

Member Avatar for you207
0
688
Member Avatar for srikanth2321

Hi, below is the code which I'm using to update a jar, unfortunately it is not updating the jar file which is in use by some program. I mean the jar itself has this code to update it's own file. The code is working if I want to update another …

Member Avatar for JamesCherrill
0
171
Member Avatar for sk8ergirl

Hi, When I tried to run my main in netbeans I got this error java exception in thread "main" java.lang.UnsupportedClassVersionError I'm using netbeans 7 (macbook) ..what I tried to google the error and some people said that the Java Runtime is diffrnet than the JDK .. how can I solve …

Member Avatar for JamesCherrill
0
447
Member Avatar for anjijava16
Member Avatar for PaulDel

I am trying to load multiple jpeg files into java using BufferedImage. I can load and display one file using; BufferedImage loadImg = loadImage('trial0001.jpg); When I try to add a second file, all I get is error messages. Thoughts please. Thanks

Member Avatar for PaulDel
0
148
Member Avatar for Twee Nguyen

I just begin studying Java programming language and I want to solve cubic equation, but I do not know how to solve it and count the cubic root in java. Could you help and guide for me, please?? Thank you so much!

Member Avatar for Twee Nguyen
0
205
Member Avatar for anestistsoukalis

**Hey there ! Here is my question:** I am facing with an easy problem i think. I am creating 4 objects. Then i make an ArrayList in which i am storing the 4 objects. The excercise is to delete the objects that are the **same(equals)** and then sort them by …

Member Avatar for JamesCherrill
0
208
Member Avatar for Start4me

I was thinking if it would be possible to create a JFrame, and make the title of it to change, such as make the title work as a counter that will display some text like: The window was opened for 1 second. The window was opened for 2 second. The …

Member Avatar for Seldar
0
1K
Member Avatar for aVar++

Hello, I have a countdown timer. The countdown timer counts down in miliseconds. I have worked out hours by using the sum: (((millisUntilFinished / 1000) / 60) / 60) Now minutes, I did this today and I seriously can not see how minutes works, but it does, here is what …

Member Avatar for aVar++
0
162
Member Avatar for manel1989

hi everyone! I would like to know how you can put a matrix that came from c + + code in the Java console in an matrix in java. In fact, I send parameter to my c + + code from the java code, and the receipt of income is …

Member Avatar for JamesCherrill
0
296
Member Avatar for sciprog22

Hello, I am testing the following applet on my webpage: import javax.swing.*; public class Hello extends JApplet { public void init() { JOptionPane.showMessageDialog (null, "Hello World"); } } My Hello.html file from BlueJ: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- This file automatically generated by BlueJ Java …

Member Avatar for sciprog22
0
139
Member Avatar for skyyadav

This is my output { { d: { a e } } { e: { b c d } } { b: { a e } } { c: { a e } } { a: { b c d } } } I used this to_string to print this …

Member Avatar for JamesCherrill
0
89
Member Avatar for gustav.cajander

Hi! Im looking for the easiest way to include a couple of non jar-files in my java webstart bundle. I also want my code to look for the resources in the codebase rather than in my user.dir. At the moment i can't change the webstart working dir and that makes …

0
45
Member Avatar for hamza.khan.5473894

address book holds a collection of entries, each recording a person's first and last names, address, city, state, zip, and phone number. It must be possible to add a new person to an address book, to edit existing information about a person (except the person's name), and to delete a …

Member Avatar for Nguyễn Đình Đại
-1
180
Member Avatar for Ed87

How do i set up netbeans IDE for use on Windows 8 Enteprise Are there any download links?. I want to use netbeans with the latest oracle database in development. ..How will i set up the connection strings to the database in such a case .Finally how can i use …

0
54
Member Avatar for manel1989

hi all! i have to send a whole vector as a parameter from a code java (eclipse) to a c++ code(VS2010)i have some quations about that: 1. how can i send the whole vector in once? i already know how to send it element by element so i want to …

0
95
Member Avatar for Denmbithi

hi everyone i need your help, i ave a project where by i have to create a simple mortgage calculator. the problem is that i have to create a login frame where it will redirect me to the main frame which is the calculator.Could someone show me how to switch …

Member Avatar for Seldar
0
240
Member Avatar for XTMercenary

OK my original idea was to create a revision application for android using flashcards that a user could create. the application would provide statistics for how well the person was doing with their revision eg. no of cards correct/incorrect etc. I was then hoping to have an online database where …

Member Avatar for JamesCherrill
0
144
Member Avatar for lauraroxi

Is it possible/compatible to use Session Types in Java for a cloud-based application using Windows Azure (SDK for Java)?

0
201
Member Avatar for Pyler

import java.util.NoSuchElementException; import java.util.Stack; public class StackList<T> implements SomeList<E>{ /* Comments * only use offer(), poll()/remove, isEmpty(), and size() methods*/ private Stack<T> stack=new Stack<T>(); public StackList(){ Stack<T> stack=new Stack<T>(); stack=stack1; } public void push(T thing){ stack1.push(thing); } @Override public T pop(){ if(this.isEmpty()){throw new StackOverflowError();} return stack1.pop(); } @Override public void …

Member Avatar for JamesCherrill
0
226
Member Avatar for chdboy

I am trying to update with this code Result.updateInt("bank_ac_no",Integer.parseInt(acnotxtfield.getText().trim())); //this is the line I'm getting error. Here is the Trace java.lang.NumberFormatException: For input string: "2737383928291819" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:495) at java.lang.Integer.parseInt(Integer.java:527) What's wrong?

Member Avatar for chdboy
0
2K
Member Avatar for Benjamin_4

i want to write a function which calculates the Monthly depreciation and accumulation of an asset but i am having difficulties writing it to calculate and insert it into my datebase.I will appreciate the help private double getAccumulation(){ double Accumulation = 0; double Monthly_Depreciation; int Estimated_Useful_Life = Integer.parseInt(eul.getText()); double Cost_Of_Acquisition …

Member Avatar for london-G
0
155
Member Avatar for Om Prakash_1

Is java a platform Independent language. I think its no? My question is in what respect java is totally platform dependent. Is there any case? Share with Us. I have seen this question. So please reply quickly. Java is probably one of object oriented programming. Does it purely object oriented …

Member Avatar for rubberman
0
207

The End.