32,199 Topics

Member Avatar for
Member Avatar for 54uydf

1. is it possible to put 2 values with 1 key into a HashMap? I know the regular put(k,v) won't do it..but I'm trying to override many functions to fit my needs and I can't figure out a way to do it.. let's say the key is a name and …

Member Avatar for 54uydf
0
112
Member Avatar for techie929

Hi, My java program runs fine on eclipse but when I run it on another system which has Java 1.4.2 I am not able to run it. I am using vectors in my program.It is not able to recognize vectors. '.class' expected Vector<int[]> resulttest = new Vector<int[]>(); hello.java:199: not a …

Member Avatar for JamesCherrill
0
89
Member Avatar for HappyCat123

Hey guys, I am very new to Java and I am trying to create a simple GUI and make the background a picture, I've tried to google and look on this site for the answer and also tried to implement the solutions and I simply cannot get anything to work. …

Member Avatar for JamesCherrill
0
1K
Member Avatar for jrosh

I connect a mysql database through a Axis2 web service with J2me app. Every time i insert a data to the database the following exception occurs. java.rmi.MarshalException: SAXParseException in response from server But the operations get completed successfully. Also this occurs only when i try to write a record to …

Member Avatar for peter_budo
0
188
Member Avatar for WolfShield

Hello, I have been working on a speech synthesis program using JSAPI and FreeTTS. I now have the code with NO errors (!!!:)) However, when I run the code, it doesn't actually have any audio to it. If I change the text spoken to "This is text that is spoken." …

Member Avatar for WolfShield
0
188
Member Avatar for WolfShield

Hello everyone, I am working on a program right now and part of the idea involves a pop-up menu. What I need is something like: A small box in the program, On MouseOver small box, small pop-up menu opens up next to the small box, On MouseOver menu option 1, …

Member Avatar for WolfShield
0
102
Member Avatar for kodera

I am working on an assignment that calls upon a text file to read numbers line by line. If line 1 number is 1, it looks at line 2 number (ex, line 2 = 13), and uses OneNumber class file to do various methods (such as prime or not prime). …

Member Avatar for kodera
0
294
Member Avatar for Shizuo

How do I change a component that is called in a different class? for example i have added a button on a jframe then called the frame, then in another class how can i change the setVisibilty of the button that was called in the other class?

Member Avatar for Shizuo
0
93
Member Avatar for axiss
Member Avatar for HappyCat123
1
483
Member Avatar for Egbune

Please am new to Java as a language and I want to use it my Bsc project what do I do?

0
50
Member Avatar for lsvife

Hi, I am beginner in java programming. I want to create a program that will enable the user to input data? I want to check if the input is numeric or not. How to do it? thanks!!!

Member Avatar for mKorbel
0
118
Member Avatar for ady_1

Tried running ant on some example source and keep getting this error.. Does anyone know as I'm assuming i'm maybe missing the ejb libs but am pointing to the glassfish/jdk which should have them? I also thought JSE compiles JEE code? thanks. [CODE]Z:\My Desktop\ejb3-samples\chapter1>ant Buildfile: Z:\My Desktop\ejb3-samples\chapter1\build.xml common: [echo] BuildName: …

Member Avatar for ady_1
0
123
Member Avatar for devin2203

Hi all Am trying to Truncate the end of a linear list in java. so that: [CODE] // reduce the size of the list to s by removing all elements // with indices greater or equal to s; return the number of removed // elements; // for example, if the …

Member Avatar for devin2203
0
458
Member Avatar for iwannalearn

i am begineer in java and i want to know what are the fields in java and for what they are used??? plz explain in detail

Member Avatar for JamesCherrill
0
84
Member Avatar for hanifa

Hi, I am writing a code to get pixels value of the entire image and store it into a array. But i am facing the problems, as outlined below. I would be grateful if someone could help me in sorting this out.. Cheers :) [code=syntax] File inputFile = new File("one.jpg"); …

Member Avatar for rinky khan
0
1K
Member Avatar for gedas

hey, i am using the value returned from the accelerometer. it returns me the "roll" value which is between -180 to 180 that adds up to 360. what i want to do is just simply produce this on the screen by drawing a line (g1.drawLine();) that would rotate in the …

Member Avatar for JamesCherrill
0
130
Member Avatar for mjv89

I would like to modify this program so that it also prints out the location of the element in the array that contains the maximum, so in System.out.println("The maximum is " + maximum ); it will be more like -- System.out.println("The maximum is " + maximum + "its location is …

Member Avatar for mjv89
0
191
Member Avatar for HesterSuma2007

our assignment is we are going to create a calculator(console based) in JAVA but my problem is how could I make equal sign as a terminator.. for example i'll add 5+10. if i press equal.. the answer will come out instead of pressing enter key..

Member Avatar for HesterSuma2007
0
160
Member Avatar for Kirielson

I have a question about programming Java into HTML using the latest version of Tomcat. I'm trying to get the option values from the HTML to go inside the Java program and print out said values. A friend of mine suggested that I create an array of strings and then …

Member Avatar for mandy011
0
1K
Member Avatar for sirkido

C:\My Documents\sprayproject.java:100: <identifier> expected JOptionPane.showMessageDialog("\nTotal fees charged: R"+total+"\nCost exceeding R3000: "+count); ^ 1 error Guys please assist me in rectifying the above error? Following below is my coding... import javax.swing.*; public class sprayproject { public static void main(String[]args) { String name, temp, temp2; int option, acres, farmno, count=0; double cost, …

Member Avatar for JamesCherrill
0
179
Member Avatar for end3r

Hy, I have a JPanel within a JFrame. In the menu bar of the frame I have a check button that would show/hide a toolbar within the JPanel. The toolbar is a JToolBar type and is added in the NORTH region of the layout. It occupies the whole region but …

Member Avatar for end3r
0
425
Member Avatar for gedas

hey, i receive one value from an accelerometer that shows the roll of the accelerometer the value ranges from-180 to 180 which is 360 degree angel. what i want is to represent this value on the screen by drawing a line that would rotate accordingly to my accelerometer. this video …

Member Avatar for gedas
0
87
Member Avatar for Phil++

Hello, I'm really confused.. If I have a string in Java, let's say "Phillip" and I wanted to store this in an array... e.g. [code] name[] = { "P", "H", "I", "L", "L", "I", "P } [/code] would I use a for loop for the string? Helo?

Member Avatar for mKorbel
0
153
Member Avatar for shantanusinghal

this is the code for my class assignment [code=c] import java.util.Calendar; class ClockThread implements Runnable,KeyListner{ int sec,min,hour; Thread thr; ClockThread(){ Calendar rightNow = Calendar.getInstance(); hour=rightNow.get(Calendar.HOUR); min=rightNow.get(Calendar.MINUTE); sec=rightNow.get(Calendar.SECOND); thr=new Thread(this); thr.start(); } public void run(){ while(true){ try{ Thread.sleep(1000); sec++; } catch(InterruptedException ie){ System.out.println(ie); } if(sec>=59){ sec=0; min++; } if(min>=59){ min=0; hour++; …

Member Avatar for mKorbel
0
188
Member Avatar for canyvr

hi~ i am a beginner of using Javascript.I am doing a project. The project needs: 1.creat a textbox to let the user input their mark. 2.creat a second textbox and a button 3.after enter a mark in the first box and click the button,the second textbox show the grade That …

Member Avatar for canyvr
0
137
Member Avatar for hantuapi

[CODE] import java.io.*; import java.util.Date; public abstract class Customer { //super class customer String customerName; String customerID; String customerAdd; String customerPhone; String dateOfMembership; public Customer(String name, String id, String add, String phone, String date) { //constructor this.customerName = name; this.customerID = id; this.customerAdd = add; this.customerPhone = phone; this.dateOfMembership = …

Member Avatar for stultuske
0
104
Member Avatar for bharath54321
Member Avatar for mKorbel
0
478
Member Avatar for nickliutw

I'm practice to make a program that calculate total value of five products. I want the user can keep input the quantities of one of the five product without return the main menu. So I create a while loop to solve the problems. But the problem I have now, how …

Member Avatar for nickliutw
0
142
Member Avatar for carlitosway17

Hi I am supposed to modify class employee to implement interface Payable(another class) and declare method getPaymentAmount to invoke method earnings. Method getPaymentAmount would then be inherited by the subclasses in the Employee hierarchy. When getPaymentAmount is called for a particular subclass object, it polymorphically invokes the appropriate earnings method …

Member Avatar for carlitosway17
0
198
Member Avatar for thedalek

Everything about this code works fine, except the while loop won't end, even when the strings are perfectly matched. Help, please? [CODE]import java.util.Scanner; public class SecretPhrase { public static void main(String[] args) { System.out.println("Congratulations! You won! Thanks for playing!"); } } [/CODE]

Member Avatar for thedalek
0
157

The End.