35,618 Topics

Member Avatar for
Member Avatar for java dummy

I'm trying to get a calculation done in a loop but don't want it to print until after all loop are done. It will print but the calculation isn't done. Please help. import java.util.*; public class FlipCoin { public static void main(String[] args) { String choiceString; final String HEADS = …

Member Avatar for BestJewSinceJC
0
179
Member Avatar for akulkarni

i have a code with me [code] import java.applet.*; import java.awt.*; /*<applet code="DialogTester" width=400 height=400></applet>*/ public class DialogTester extends Applet { public void init() { Container container=this.getParent();//this ;why not create object of the class and call the function while(!(container instanceof Frame)) { container=container.getParent(); } Frame parent=(Frame)container; Dialog myDialog=new Dialog(parent,false); myDialog.setLocation(320,240); …

Member Avatar for VernonDozier
0
115
Member Avatar for hajjo

[url]http://www.jsptut.com/Forms.jsp[/url] I am not able to get that example working. how do i create userdata.class??? how do i get it compiled?? I am workign tomcat. I am using the browser to check up my results. And where do i store userdata.class Also aniother question, whats a bean? plus, why if …

0
50
Member Avatar for fred2

[COLOR="Red"]hi everyone im doin a java application that should show the records in tha database on a jtable the code so far is this:[/COLOR] [code] /** * @(#)table.java * * table application * * @author * @version 1.00 2009/8/14 */ /* * SimpleTableDemo.java is a 1.4 application that requires no …

Member Avatar for fred2
0
152
Member Avatar for sven1981

i extraction the files download from [URL="http://www.daniweb.com/forums/thread141776.html"]here[/URL] ,but i encounter problem after i key in username and password from index.jsp. "HTTP Status 404 - /daniwebtutorial/controller/login type Status report message /daniwebtutorial/controller/login description The requested resource (/daniwebtutorial/controller/login) is not available. Apache Tomcat/6.0.18" Ver. Tomcat : Tomcat 6.0 paths to java :C:\Program Files\Java\jdk1.6.0_12\bin; …

Member Avatar for masijade
0
188
Member Avatar for jdfskitz

I have been trying to learn java for a while but i cannot find out where to start can someone please help me?? I am Trying to learn as fast as possible . I have hosted a world of warcraft private server... Learned some div, css and html and i …

Member Avatar for peter_budo
0
125
Member Avatar for ashish2234

i am new to swings and i don't properly know where and how to use drawString in swings !! please help!! import java.awt.Graphics; import java.awt.*; import java.awt.Graphics2D; public class Main extends javax.swing.JFrame implements Runnable { String m1="hello"; Thread t =null; boolean flag; /** Creates new form NewJFrame */ public Main() …

Member Avatar for VernonDozier
0
106
Member Avatar for Questions???

Hello, I have a question about array lists, specifically how to pass array lists to a method. Then once in the method how to do simple algorithms. My example is I have three array lists, two of which have static double numbers and the third who's numbers are the end …

Member Avatar for Questions???
0
76
Member Avatar for applefat

I realize that Java doesn't literally allow you to pass functions as arguments. And I've seen threads that address this topic with regular members, but I can't seem to adapt it for static methods. I have two classes that act kind of like two different "datasources" (A and B). They …

Member Avatar for applefat
0
2K
Member Avatar for smoore

Okay so I posted my [URL="http://www.daniweb.com/forums/post936498.html#post936498"]first large project[/URL]a few weeks ago (2 or 3 i think) and now I finished another one! It is smaller then the 1st (about half the size) but still pretty cool I think. Anyway. It is called uCount and it is something I put together …

Member Avatar for VernonDozier
0
96
Member Avatar for malugirl4

I have just completed my java code for the game engine maze I have been working on. We are told to download MARS and from java code it in assembly. I have never learned assembly. So I am completely lost. I so far downloaded MARS and uploaded my java code. …

Member Avatar for wildgoose
0
5K
Member Avatar for llemes4011

Before I say anything else, I do realize that there are numerous threads on this topic, but I haven't been able to fix my problem. Okay. Well, here's my problem. I'm writing a map editor for the game that I'm working on, and the map is oftentimes much larger than …

Member Avatar for llemes4011
0
130
Member Avatar for ogi.za.forum

I need to create web application which will show advertisement on the internet. Main functions of application should be publishing, deleting and searching of advertisement . So website needs to have front page index.jsp, which leads on two pages AddAdvertisement.jsp and searchAdvertisement.jsp 1. It's needed to create Html forms for …

Member Avatar for peter_budo
0
76
Member Avatar for masterjiraya

[CODE=JAVA] import javax.swing.*; public class TimeDeposit{ public static void main(String[] args){ String choice1, choice2,monthlySales,income; int value1, value2; // to display value of a variable DecimalFormat num=new DecimalFormat(",###.00"); JOptionPane.showMessageDialog(null,"Monthly Sales In $","Bank", JOptionPane.INFORMATION_MESSAGE); JOptionPane.showMessageDialog(null,"the Interest is 0.025"num.format(monthlySales)+"income is"+num.format(income),"Bank", JOptionPane.INFORMATION_MESSAGE); choice1=JOptionPane.showInputDialog("The time less than: "); value1=Integer.parseInt(choice1); choice2=JOptionPane.showInputDialog("The deposit is greater than: "); …

Member Avatar for cgeier
0
85
Member Avatar for william ndugire

what do i require to develop a dynamic website that will be capable of supporting short message service (sms) from different network provider and give them a chance of registering using their cellphone

0
47
Member Avatar for rugae

I can't figure how to get this going, for every object I create I want to add that to the existing array. I read about arraycopy but I don't know how to increase the existing size of the array and always end up with array out of index error... [code=java]A …

Member Avatar for eng.M4AH
0
163
Member Avatar for Half_Pirate

Hello. I am an international student trying to solve my assignment which requires to implement Circular Linked List. I asked my lecturer to check my work and she said that I solved it but actually still using the normal Linked List (Linear). She hinted me that I need to modify …

Member Avatar for eng.M4AH
0
145
Member Avatar for surima

how to generate number and characters together randomly. I know how to generate numbers randomly, but not getting anywhere with random character generation. Please help.. Thanks

Member Avatar for JamesCherrill
0
151
Member Avatar for ashish2234

Actually what i want to do is that on a click of a button , the selected row of the jTable increments to next row so that i can fetch that row to play the next song...how can i do that???

Member Avatar for TheWhite
0
111
Member Avatar for kashn

Hi, Is it possible to embed a java applet into C#? Like WITHOUT downloading it, as if the applet is included as a resource or something. I made the applet so I do have the source ofcourse, if that makes it any easier. Thanks! Also, Is it possible that I …

0
52
Member Avatar for clc571

So this is going to sound like other posts but I have been racking my brain to figure this out. This code is a mod of one that my instructor posted, he said it was fine to just change the names of variables and submit it. When I did so …

Member Avatar for VernonDozier
0
82
Member Avatar for toucan

I'm trying to run a thread until a mouse event occurs, which will trigger an interrupt to the thread. The problem is that I can't get the thread to stop running in an asynchronous way (i.e. to listen is a mouse event occurred). Instead, what happens is that the thread …

Member Avatar for JamesCherrill
0
181
Member Avatar for jonny_java

I have the code at the bottom of this post: Running [icode]abc x = new abc()[/icode] can often take a long time (minutes or longer) and is only ever necessary if flag is true. If I leave the code as it is below, I get a "x cannot be resolved …

Member Avatar for jonny_java
0
114
Member Avatar for terence6203

Hey guys. I am new to Java programming and I am having a lot of difficulty figuring out how to get the proper functionality out of my first, last, next, and previous buttons. First, I was wondering if my button setup is correct: // helper method that creates panel for …

Member Avatar for terence6203
0
668
Member Avatar for Xessa

[code] package mypackage; import java.security.SecureRandom; import java.util.Random; public class SecureRandomTest { /** * @param args */ public static void main(String[] args) { SecureRandom sr1 = new SecureRandom(); System.out.println("1. SecureRandom object 1. nextInt() result :" + sr1.nextInt()); System.out.println("1. SecureRandom object 2. nextInt() result :" + sr1.nextInt()); System.out.println("1. SecureRandom object 3. nextInt() …

Member Avatar for Xessa
0
319
Member Avatar for get2tk

pls i need help!I am writing a code to turn on and turn off a light bulb between a client side and a server side using sockets in java.The thing communicates but i am having problem puttin it on gui radio buttons .I called the method to sendMesage from the …

Member Avatar for JamesCherrill
0
139
Member Avatar for gaya123

I have a jsp where i have two buttons. Each button runs a script on click and then in the script i invoke submit(the action is to a servlet)... my problem is when the script invokes submit, it goes to the servlet...but the value of the button that was clicked …

Member Avatar for Thirusha
0
79
Member Avatar for valleymorning

Dear all, I'm a newbie learning Java. Could you please help me on how to find the length of the longest group of duplicates in an array using Java. Let's say we have an array of integers as follows {9 7 7 7 7 3 2 1 1 5 5 …

Member Avatar for valleymorning
0
109
Member Avatar for alsoumhi

Hi experts , I got problem and need help please. I have created a servlet sends a message to the client, I have tried to attach a text file with message being sent but I couldn't do that. please help me how to attach a file with a message. is …

Member Avatar for peter_budo
0
77
Member Avatar for dsathsara

I have woking on a Java desktop application which connects to the ISPs webserver database (remote access is allowed) and it works fine on my computer. I'm trying to desploy my application as a webstart application. But when I try to run the JAR file using the JNPL the database …

0
47

The End.