32,199 Topics
| |
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 | |
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 … | |
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 … | |
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, … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
how to find 2nd largest array if array values like{10,20,92,81,92,34} | |
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 | |
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! | |
**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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Is it possible/compatible to use Session Types in Java for a cloud-based application using Windows Azure (SDK for Java)? | |
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 … | |
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? | |
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 … | |
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 … |
The End.