32,204 Topics

Member Avatar for
Member Avatar for dubdub

So I am working on storing inorder traversal indices associated with every node in a BST (So if I add BAC, then the inorder index of A = 0, B = 1, C =2). The thing is that whenever you add a new node to a BST, you must recompute …

0
44
Member Avatar for dalymiddleboro

/** * Simple math application using a scanner input * @version 1.00 2010/1/26 */ import java.util.*; import java.text.*; import java.io.*; public class mathopr { public static void main(String[] args) { double num1,answer1,answer2,answer3=0; String myname; String reply; char replyChar=; Scanner input = new Scanner(System.in); DecimalFormat df= new DecimalFormat("00.00"); while (replyChar=='y'){ System.out.println("Please …

Member Avatar for AndreiDMS
0
83
Member Avatar for doha786

hi, i m facing a small prob in GUI, need to save my output to a particular folder. below this code showing the square of any integer in TextField named: "resultField". i've a button "save" that need to save the result from that TextField, suppose in my "c:\Repository " folder …

Member Avatar for BestJewSinceJC
0
152
Member Avatar for dubdub

Is there a simple way to find and store the depth of every node in a BST using recursion? I can't seem to figure out a straightforward way of doing so.

Member Avatar for BestJewSinceJC
0
98
Member Avatar for youngwolf0

I'm fairley new to programming in general being a fresh IT graduate. Some software I am developing needs to be able to compress a folder in to a .zip file and later extract it while maintaining its file structure. I am able to do this but extracting the file takes …

Member Avatar for ~s.o.s~
0
183
Member Avatar for chern4ever

[CODE]import javax.swing.JOptionPane; public class test{ public static void main(String args[]){ String numT = JOptionPane.showInputDialog(null,"Please enter a value."); double num1 = Double.parseDouble(numT); System.out.println("Fahrenheite = "+num1+"\nCelcius = "+convertFtoC( num1 )); } public static double convertFtoC ( double num1 ){ return ((5/9)*(num1-32)); } }[/CODE] why the value return is zero? hrm... can anyone …

Member Avatar for fardoonmuhafiz
0
175
Member Avatar for billybobc

Hello, When I add a simple <c:set var="foo" value="bar"/> line to my jsp I get the following error: javax.servlet.ServletException: javax/el/ELException org.apache.jasper.servlet.JspServlet.service(JspServlet.java:273) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) root cause java.lang.NoClassDefFoundError: javax/el/ELException java.lang.Class.getDeclaredMethods0(Native Method) java.lang.Class.privateGetDeclaredMethods(Unknown Source) java.lang.Class.getDeclaredMethods(Unknown Source) java.beans.Introspector$1.run(Unknown Source) java.security.AccessController.doPrivileged(Native Method) java.beans.Introspector.getPublicDeclaredMethods(Unknown Source) java.beans.Introspector.getTargetMethodInfo(Unknown Source) java.beans.Introspector.getBeanInfo(Unknown Source) java.beans.Introspector.getBeanInfo(Unknown Source) java.beans.Introspector.getBeanInfo(Unknown Source) java.beans.Introspector.<init>(Unknown Source) java.beans.Introspector.getBeanInfo(Unknown Source) …

Member Avatar for heathersh
0
2K
Member Avatar for guravharsha

Hi everyone I have one we application developed using java,servlet and jsp. i am running it using Apache tomcat server 5.5. When i am running it on my local machine, i am given path as [B][url]http://localhost:8080/student/[/url][/B] where as student is name of application. Now if i require run same application …

Member Avatar for jwenting
0
110
Member Avatar for youngwolf0

I'm fairley new to programming in general being a fresh IT graduate. Some software I am developing needs to be able to compress a folder in to a .zip file and later extract it while maintaining its file structure. I am able to do this but extracting the file takes …

Member Avatar for youngwolf0
0
155
Member Avatar for Stefano Mtangoo

This is not seek for IDE thread but rather want just to know your beloved IDE. For Me, up to recently I used Eclipse but now I'm trying IntelliJ Idea community. Not very used to it but looks promising. What about you friend?

Member Avatar for jwenting
0
148
Member Avatar for geoffy0404

Hello, i have a few questions regarding - writing software and using that software in my cell phone. -Which language is best for cell phone software? - Can i use java, and would that be the easiest? -where do i even start when i begin to write a cell phone …

Member Avatar for siva08811a1253
0
149
Member Avatar for basketball4567

I need to be able to choose one of the three boxes and have then drag around the screen, i can only get 1 of them, kinda of. I want to be able to drag the red one, or the green. I can kinda get the green to drag but …

0
89
Member Avatar for NPP83

Are objects that are instantiated from their respective class done so within the code of the class itself (as in on the same document (Class.java) or are they created from the code in main method of the program (Main.java). More questions to build on this... Thanks ahead of time! -Isaiah …

Member Avatar for BestJewSinceJC
0
48
Member Avatar for Loved

[code=Java] /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package paint1; import java.awt.event.*; import java.awt.*; import javax.swing.*; import java.awt.image.*; /** * * @author Jeanine */ public class MyPanel extends JPanel { private int startX, startY, endX, endY; public int …

0
36
Member Avatar for AnnaBaker

I am new to Java and have a class assignment that I need help with.. The assignment is to write a program that computes the tax and tip for a restaurant bill. User is to enter the total amount of the bill. Tax is 6.75% of the bill. The tip …

Member Avatar for Ludachrispeed
0
3K
Member Avatar for pucivogel

i am creating a program for hotel management,i want to get the source from JButton and JCheckBox at the same time,how do i do with actionListener? [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; public class HotelManagementGUI extends JFrame implements ActionListener {static final String[] rommcouplesea={"1","2","3","4","5","6","7","8","9","10"}; static final String[] roomcoupleroad={"1","2","3","4","5","6","7","8","9","10"}; static final …

Member Avatar for AndreiDMS
0
86
Member Avatar for selenask

Hello could someone please help me as my program is generating some weird error" java.lang.IllegalArgumentException: adding a window to a container" Could someone please look at it and tell me what I'm doing wrong. Im trying to add an object of fan to the panel it creates that error. whenever …

Member Avatar for KirkPatrick
0
163
Member Avatar for KirkPatrick

I have created a function that is supposed to go through a text file (csv) and read the information in it and then add it do a dataobject (which just holds the info in textfields and a combobox) which when filled adds itself to the jpanel. The issue I am …

Member Avatar for KirkPatrick
0
134
Member Avatar for jemz

hello can you help me on this i have gel compiler then i want to debug my program but the debug button is not highlighted then it can't be click...ahm can you help me on this or please suggest me if what is the best compiler for java?...thanks in advance …

Member Avatar for jemz
0
103
Member Avatar for karthickparthi

[code]import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.ServerSocket; import java.net.Socket; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JProgressBar; import javax.swing.JScrollPane; import javax.swing.JTextArea; …

Member Avatar for JamesCherrill
0
93
Member Avatar for kgkamaraj

i am doing project in java.... can any one suggest how to write code for mathematical regression in java.. .or did any one have code for that...... any website is there to learn for mathematical regression...

0
53
Member Avatar for jamojo

Hello everyone, I am using the code below. It is working when I used this in Eclipse. What I did is to place the generated keystore from the InstallCert.class ([url]http://blogs.sun.com/andreas/resource/InstallCert.java[/url]) to the latest JRE in the Program Files>Java But when I deployed this class in the Tomcat/Bea its searching I …

Member Avatar for xiaocong
0
442
Member Avatar for mseck

iam currently on a program that reads two integers values, with the second has to be a non-zero integer. here is my codes so far: Does it look ok ? PLEASE HELP !:( [CODE]public class Lab2App { public static void main(String[] args) { // Calculate 5 and 3 with relation …

Member Avatar for javaAddict
0
159
Member Avatar for bharri

the application below is what i did so far, please give me feedback the Payroll Program so that it uses a class to store and retrieve the employee's name, the hourly rate, and the number of hours worked. Use a constructor to initialize the employee information, and a method within …

Member Avatar for verruckt24
0
90
Member Avatar for rwildman23

The following lab was originally assigned but skipped over because we were off for MLK day. I would still like to do it but am just not following what I should be doing. Help? In this lab you are going to extend the code you wrote in you first lab. …

Member Avatar for musthafa.aj
0
124
Member Avatar for bloodreign39

I am having some problems with my java code, i am trying to write a C compiler and am currently working on developing a string tokenizer for the C programming language using java regex. my problem is first my program wont recognize multiline comments and second i cant figure out …

Member Avatar for musthafa.aj
0
198
Member Avatar for DavsTaylor

This is probably a stupid mistake but I can't see the issue, it's with the if statement at the bottom: [code=java] /** * Write a description of class Order here. * * @author David Taylor * @version 1.0 */ import javax.swing.*; import java.text.DecimalFormat; public class Client { // instance variables …

Member Avatar for AndreiDMS
0
143
Member Avatar for conspiracy_dawg

I've been having problems with the now deprecated mouseDown and mouseDrag methods, I know the deprecation causes no problem, the program runs fine, but for grading purposes I want my program to be error and warning free, is there any EASY alternative that can solve this deprecation method? I know …

Member Avatar for PersonalIT
0
471
Member Avatar for severman
Member Avatar for AndreiDMS
-1
113
Member Avatar for severman

hi does any 1 can show me a simple code how to show a picture on a j2me cellphone? what i want to do is: i have a tcp server based on j2se. i want it to send a png/jpg to a cell phone via the socket and then show …

Member Avatar for peter_budo
0
107

The End.