32,199 Topics

Member Avatar for
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
123
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
469
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
Member Avatar for Janes

Hi, I would need help, pleas. I would like to portray the curve under the specified angles with the repeat and the number of segments. Will you help me please? now I have this: [code] import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Graphics; import java.awt.HeadlessException; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import …

Member Avatar for adams161
0
112
Member Avatar for adams161

I have a java applet and i'm letting the user open a chess engine on their computer. Technically they can open any program now. but it wont work unless its a chess engine that uses the winboard protocol. My question is could they maliciously choose to open any sort of …

0
86
Member Avatar for Shmoil

Forgive me I am still really new to Java. I have this swing application which creates a small JFrame that when clicked, counts down from 2 minutes and stops at zero. I build a GUI in netbeans IDE and I read that in order to place this timer code into …

Member Avatar for Shmoil
0
277
Member Avatar for Olliepop

Hey guys How can i make instances of drawString editable? For example changing their x, y and value? Do i use variables for example [CODE=java]g.drawString(str1, x1, y1);[/CODE] Will the change be reflected as soon as i change the values of the variables? Thanks very much for your time!

Member Avatar for AndreiDMS
0
100
Member Avatar for mseck

Hello I am new at java programming and having a hard time at this very basic coding. How to i write a java application that inouts 3 different integers from the keyboard and prints the outpout as in the following : Output the 3 different integers are: 13, 27, 14. …

Member Avatar for javaAddict
0
266

The End.