32,204 Topics

Member Avatar for
Member Avatar for xcrypted1

*Edit* Just so you know, we are on the chapter in the book introducing ArrayLists *Edit* I am having trouble with this problem. The problem is stated: Implement a class Polygon that contains an array list of Point2D.Double objects. Support methods public void add(Point2D.Double aPoint) public void draw(Graphics2D g2) Draw …

Member Avatar for NormR1
0
575
Member Avatar for moonL!ght

hellow every one im facing problem in my coad wich i tried to understand what is the mistake of my symantic but no progress..... this is the code [CODE] private static void NNA(ArrayList<triple> Graph,String GoalN) { ArrayList<triple> vp= new ArrayList<triple>(100); int index=0;// the index of the nodes in the visited …

Member Avatar for JamesCherrill
0
264
Member Avatar for arathy nair

Hi all, I have a situation where am using String conditions(say if(name.equalsIgnoreCase(Arathy)). I want to replace this if-else loop with Switch cases..What way i can do to accomplish this?

Member Avatar for ~s.o.s~
0
159
Member Avatar for dennysimon

hello all what is the meaning of : "Value@a90653" I just try to print a variable but the result is "Value@a90653" thank you denny

Member Avatar for dennysimon
0
140
Member Avatar for tabish saroha

Dear All, I am writing the following code but I am facing some problem. public void actionPerformed(ActionEvent ae) { if (ae.getSource()==connect) { JOptionPane.showMessageDialog(null, "Connection Estabilished"); } else if (ae.getSource()==disconnect) { JOptionPane.showMessageDialog(null, "Connection Disconnect"); } } When I Write this code, compiler compile this code but does not show messagebox when …

Member Avatar for NormR1
0
128
Member Avatar for rampletero

hello this is my first time posting so sorry if I make any errors, im currently trying to ad a sliding movement to a tile game im trying to do, the tiles currently move but they move in a jumping motion, ive been trying to use the coordintes of the …

Member Avatar for rampletero
0
126
Member Avatar for bluealein56

Im creating a calculator that allows users to enter their own Loan Amount, then choose whether to input their own Loan Interest and Monthly Loan Terms, or to choose between a set of predefined loan terms and interest rate in a GUI. So far I have been successful in creating …

Member Avatar for NormR1
0
250
Member Avatar for Steve2490

Ive created a memory game which has a grid of JButtons, when the button is clicked it changes the ImageIcon background to an animation which shows the front of the card. The problem is that when the button is clicked, the gif doesn't begin playing until the mouse is moved …

Member Avatar for mKorbel
0
801
Member Avatar for jackbauer24

Here is my code:- [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Administrator */ import javax.swing.*; import java.awt.event.*; import java.awt.event.*; import java.awt.*; public class MyQuiz { int score; JFrame frame; String[] questions = {"Who invented …

Member Avatar for stultuske
0
190
Member Avatar for wallet123

[CODE]package PAyroll; import javax.swing.JOptionPane; import javax.swing.UIManager; import java.awt.Color; import java.text.DecimalFormat; import java.text.NumberFormat; import javax.swing.UIManager; public class EmployeeProfile { public static void main(String[] args){ JOptionPane.showMessageDialog(null,"Welcome to Payroll System"); payroll(); } public static void payroll(){ int conf=0; // do{ String name=""; String add= ""; String contact= ""; String email= ""; String word=""; …

Member Avatar for Philippe.Lahaie
0
134
Member Avatar for nickliutw

I'm working on a project that can recursively print out the items from a single link list. The project also require the reverse method should accept a reference to a generic single-linked list. This is my logic for printing the item in reverse: if the element in a node is …

Member Avatar for nickliutw
0
206
Member Avatar for avinash_545

Dear All, I am currently working on a small project whereby I want to use a SOAP client to insert Customer Values in a database. The connection to database class is working, the only problem is that it seems that the Web Service wont communicate with this class. In the …

0
85
Member Avatar for szagarella

Hi at all. I'm a new user of jsp and I've a problem. I would execute certain operations every X seconds in my jsp project like check data into mySql DB; I use a TimerTask java class and it's ok. But if I would update the UI inside the run …

Member Avatar for Philippe.Lahaie
0
249
Member Avatar for TIM_M_91

Hi guys what I want to do is once the user has entered the id number it displays the results for the particular record. This works fine however what would I need to do to the following code so if the id number does not exist it produces an error …

Member Avatar for Philippe.Lahaie
0
128
Member Avatar for Black Knight

Right, my program ran perfectly fine with the line [CODE]JLabel headerImage = new JLabel(new ImageIcon(img));[/CODE] But as soon as i put it into a JAR file it has problems, i have searched the inet for soloutions and there isnt much out there for apps, loats for applets though, but none …

Member Avatar for joyal
0
1K
Member Avatar for Vampiricx3

Hey guys, I'm trying to create my own personal API (more like a simple way for me to write long codes), and i've run into a snag. I want to create a simple function to detect whether or not I want the consoleWrite() to print out a new line system …

Member Avatar for ~s.o.s~
0
91
Member Avatar for sutharbhavisha

Hello, I have one dataset as one arraylist. In that the columns values are in string as high, low, medium.. so how i display that values as string in c or java? pl reply me

Member Avatar for thines01
0
31
Member Avatar for km2011

Hello, everyone! I am trying to generate a random number with Java, but random with the fix number of reviewers per object.Example: I have 5 reviewers(r(i)) and 5 objects(o(j)), a[i][j] is the evaluation score that reviewer(r(i)) has evaluated object(o(j)), and my question is i want to labeled each object should …

Member Avatar for NormR1
0
677
Member Avatar for learntosucceed

I'm trying to use these icon images for my JButtons, but I keep getting "Resource not found: " [url]http://java.sun.com/developer/techDocs/hi/repository/TBG_Media.html[/url] [CODE] static ImageIcon createMediaIcon(String imageName) { String imgLocation = "/toolbarButtonGraphics/media/" + imageName + ".gif"; java.net.URL imageURL = Test.class.getResource(imgLocation); if (imageURL == null) { System.err.println("Resource not found: " + imgLocation); return null; …

Member Avatar for ejosiah
0
346
Member Avatar for hasan_cemos
Member Avatar for peter_budo
0
94
Member Avatar for hubertj

i was wondering if someone can help me with this Java codes? [CODE]/** * This is a class of Money for us to be able to input an amount and do addition or substraction * to it and display the balance.. * * @author HUBERT JIANG * @version 0.2 */ …

Member Avatar for stultuske
0
164
Member Avatar for bloodbender

Hello Daniweb, I just created a small program that generates a random integer between a given range then asks the user to guess the number, giving hints like "Too high" or "Too low" along the way until they guess the correct number. I have it all working smoothly, except when …

Member Avatar for stultuske
0
126
Member Avatar for whateverme

Hey there, I made a splash screen class and called it in a main class where it operates. In my main class I have the splash screen followed by a menu window. I was wondering how could I make the splash screen appears and then right after the menu window …

Member Avatar for NormR1
0
49
Member Avatar for divsok

[CODE] try { HttpSession hs = request.getSession(); HashMap<String,Item> items = (HashMap<String, Item>) hs.getAttribute("items"); String [] allQty = request.getParameterValues("qty"); String [] itemcodes = request.getParameterValues("itemcode"); // for(String value: allQty){ // out.print(value+" "); // } // out.print("</br>"); // // for(String itemcode: itemcodes){ // out.print(itemcode+" "); // } // out.print(items.size()); int z = items.size(); …

Member Avatar for Airshow
0
140
Member Avatar for parulparashar

how should i prepare for company FMS (i.e. finance and manpower solutions) it is coming for placements on 12 march.

Member Avatar for StephNicolaou
0
91
Member Avatar for wallet123

Me and my group members are planning to add something different to our program, we intend to put JTextField, but we have no idea on how to start it because some of the tutorials are so hard to understand. this is our program: it is a payroll system: [CODE] public …

Member Avatar for wallet123
0
1K
Member Avatar for TIM_M_91

Hi guys can anyone tell me if it is possible to sort integer values for smallest to biggest which has been stored in my database as Strings. What I want to do is list my items in an textarea that sorts the numbers from smallest to biggest. Also note if …

Member Avatar for stultuske
0
112
Member Avatar for Gnawk

Hi i need to make a method that does the example below if the array contains these number -12 3 -12 4 1 1 -12 1 -1 1 2 3 4 2 3 -12 The output should be: N Count 4 2 3 3 2 2 1 4 -1 1 …

Member Avatar for NormR1
0
117
Member Avatar for jayadan

Whats the best and easy way to learn JAVA and anyone can suggest a very good and simple website to learn and workout JAVA codes.

Member Avatar for dymatic
0
155
Member Avatar for mits28

i am making a simple bike site using servlets.i have a hyperlink toh a productServlet in menubar..but when i click dat hyperlink.it keep on showing connecting.and page do not load..anyone can tell what could be the reason..i can't show code here..

Member Avatar for peter_budo
0
135

The End.