35,617 Topics

Member Avatar for
Member Avatar for dylgod

I need to write an application that reads a distance in metres. The program will then convert the distance to kilometres, feet and inches, by calling methods. Here is my code so far... looking for pointers please. [CODE]import javax.swing.JOptionPane; import java.text.DecimalFormat; /** This program converts meters to kilometers, inches, and …

Member Avatar for jon.kiparsky
0
118
Member Avatar for sweta2010

Hi I am developing a website in that i want an automatic email should be send to the user and the data entered by user should get stored in database(mysql) when the user fills the form Can any one help me with that. Thanks in advance

Member Avatar for chackboom
-1
110
Member Avatar for Fedhell

Basically i want to make a platform game in java purely from the java 2d graphics. I have managed to link the keyListener to update variables which my graphics pane can then use to draw my images. But i cant do is get my image to refresh after the variables …

Member Avatar for Fedhell
0
710
Member Avatar for fr0styh3rb

If someone could take a look at my Java code for Payroll Program, I need to declare Int as a double in order to produce the produce of number of employees in a department times the average salary for each employee. If someone could throw up pointers, tips, or any …

Member Avatar for NormR1
0
183
Member Avatar for rahulrulez

Hey guys.. I'm just getting started with JSP, Servlet and SQL. My teacher has given me project on Shopping Cart using language JSP, Servlet and Database will be SQL. Since I'm very much starter in JSP, I don't know from where to start. So I thought of creating a thread …

Member Avatar for peter_budo
0
86
Member Avatar for mayank.dyl

Can any one please tell me exactly what is the process of creating a website using J2EE and concept of domain and web hosting....as it is a lot confusing and also i wants create a website of my own as college project.....help me out...thanx a lot..!!

Member Avatar for peter_budo
0
92
Member Avatar for anurag.kyal

Is is possible to check if the execution of a java program from python gives any error during runtime and compile time ? Any help or sample code will be of real help.. Thanks in advance

Member Avatar for Gribouillis
0
83
Member Avatar for Sunshineserene

Hi all, I'm having some problem with my codes. I have a output that is generated into a txt file. Now, I need to read the txt file and convert the output into something else. This is the output that is store in a txt file: VAL LEU SER PRO …

Member Avatar for java_programmer
0
183
Member Avatar for har58

I have problem with Radio Button I am making small online examination application. The problem is, suppose I select option 2 as the correct answer for first question, Then for second question option 2 appears as selected , This may confuse the candidate for examination,, Then if I make choice …

Member Avatar for NormR1
0
121
Member Avatar for Euphemia

Hello guys. I'm a new student in IT and they just introduced ud to GUI. I need help with how to make buttons and add images

Member Avatar for Euphemia
0
55
Member Avatar for JimBoCol

Hi all. I am, using Java for drop down menus, code follows. What I have not yet been able to figure out is how to make java display the page I select in a different frame. This is what is in the <HEAD> of one of my Pages. [CODE] <SCRIPT …

Member Avatar for JimBoCol
0
138
Member Avatar for dck133

I have a class that i have created of type StoreItem. It contains: String, int, double, int What I want to do is for the user to be able to add more items during runtime. I have tried to convert it to an ArrayList but I get errors telling me …

Member Avatar for JamesCherrill
0
122
Member Avatar for jemz

hello, can you help me please how can i random words and displaying it with the length of the string...example if the user inputed "stamp" then it will random the letters and display it 5 times... example: input : stamp output: pmast pmast stamp mastp sptma can you help me …

Member Avatar for jemz
0
1K
Member Avatar for dirisala599
Member Avatar for mahdi68

Hi how can i use volume keys and camera key in app ? i use -36 and - 37 constant value but it`s not work !!! i use this to get key name [CODE]str = getKeyName(keyCode);[/CODE] but when i press volume keys or camera key it`s return null i want …

Member Avatar for mahdi68
0
119
Member Avatar for SeanC

Hi, I'm having a problem with this part of my code: [CODE]} while ((menu2.equals("4") == false) || ((menu2.equals("3")) == false));[/CODE] The compiler seems to be ignoring it for me... is there something wrong? I basically want the loop to end if the String menu2 is either "4" or "3". What …

Member Avatar for SeanC
0
88
Member Avatar for Xufyan

See this Program, [CODE]class Test { enum Days {Monday,Tuesday,Wednesday,Thursday,Friday} enum Periods {Period1,Period2,Period3,Period4,Period5} public static void main (String [] args) { String DnP [][] = new String [6][5]; for (Days dys : Days.values()) { DnP [0][dys.ordinal()] = dys.name(); System.out.print (DnP[0][dys.ordinal()] + "\t "); } System.out.println ("\n\n"); for (int i=0; i<=4; i++) …

Member Avatar for Xufyan
0
138
Member Avatar for aakaashjois

hello guys, Can any of you help me create a game in java?? There has to be two paddles, one at the top and the other at the bottom. The paddles have to stop the ball from getting out of the screen. The ball cannot leave the screen from the …

Member Avatar for gauravk_bhanot
0
169
Member Avatar for JamesPH

Guys any idea for this equivalent c loops in java::: for (sum=0,i=0,j=0;i<10;i++,j+=2) sum+=i+j Thank you: jamesPH

Member Avatar for JamesPH
0
78
Member Avatar for johndoe444

I wrote this basic web app using jsf. My templates were jsp not jsf. And in the faces-config.xml and everywhere else I used jsp and nowhere I used jsf. But surprisingly it (the servlet container) is being able to correctly locate the thing (jsf files) it is looking for. How …

0
82
Member Avatar for ben1

public class While { public static void main(String args[]){ } public void printLoop(){ int counter = 1; while(counter <=25){ System.out.println(counter); counter++; } } } Hi, the above code compiles but nothing runs when I click on the run button. I am new to Java, you guys might find this problem …

Member Avatar for ben1
0
128
Member Avatar for gauravk_bhanot

[CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; class plc extends JPanel{ plc() { this.addKeyListener(new MyKeyBoardListner()); System.out.println("key listner added"); } public void paintComponent(Graphics g) { super.paintComponent(g); g.drawRect(0,0,10,60); g.fillRect(0,0,10,60); } private class MyKeyBoardListner extends KeyAdapter { public void keyPressed(KeyEvent ke) { System.out.println(ke.getKeyCode()); } } } public class plank { public static void main(String[] …

Member Avatar for adams161
0
78
Member Avatar for pmbfriends

HI guys !! I am new to jsp so pls do help me in solving this .. I am getting error at the highlighted part as: Syntax error,insert ": Expression" to complete Expression [code]<% ---- --- ----- UrlGen urlg = new UrlGen(request.getQueryString(), "UTF-8"); String url = "Contacts.jsp"+"?"+urlg; %> <a href="[B]<%=url%>[/B]"><img …

Member Avatar for pmbfriends
0
3K
Member Avatar for kdgeiger

Ok, I did search on this site and found nothing that really helps with my issue. I am doing assignment - JPartyPlanner - I have the applet complete, it compiles and shows in IE great, BUT when I add the image code it still compiles but I get nothing showing …

Member Avatar for kdgeiger
0
192
Member Avatar for kdgeiger

I have completed my applet code and it compiles fine - when I try to open it in explorer I get my welcome message but the applet does not fully open - all I get is the little box with the red X in top left corner. Help! Here is …

Member Avatar for kdgeiger
0
165
Member Avatar for har58

Hi, I need to select 5 distinct random numbers out of 20 in my java program. I am able to select 5 random numbers, But I want these 5 numbers to be distinct,,,i.e. unique for e.g. I dont want them to be like these 5,6,9,6,1 because 6 is repeated I …

Member Avatar for tong1
0
172
Member Avatar for java_programmer

I am writing a web service using apache axis which will accept a XML Message , process it and return another XML Message. But I am not getting any hints how to describe the input and output in WSDD file. Could anyone please suggest?

Member Avatar for sam2011
0
152
Member Avatar for Sam_john_2010

How to check text validations to form data entered by user? Can any one write a code to do this in javascript?

Member Avatar for javaAddict
0
76
Member Avatar for pratz

Hello, If I am not wrong then the method with protected access modifier can be accessed by the same package and the sub-class outside the package. But I have problem regarding the same I have two packages p1 and p2, but when I try to access the method (protected) of …

Member Avatar for masijade
0
219
Member Avatar for newjspuser

Hi all, I'm very2 new to JSP, I've give a task to make a search and pagination function for my project.... but look like it to tough for me.... here is my code... can anyone help me?? <%-- Document : index Created on : Jul 21, 2010, 11:40:54 AM Author …

0
59

The End.