32,204 Topics

Member Avatar for
Member Avatar for whiteyoh

Hi all, I would like to know what to add to the following code to count the number of objects that have been created. [code] class CDDriver { public static void main(String args[]) { CD cd1 = new CD("Kaiser "," up the khazi ",(double) 9.99); CD cd2 = new CD("Oasis …

Member Avatar for VernonDozier
-1
99
Member Avatar for MMD88

Hello! This is my first post and I am a beginner in Java programming-so don't come down on me too hard :) I have a problem that I need to solve over the weekend and I was hoping some of you could help me out. The problem at hand is …

Member Avatar for quuba
0
119
Member Avatar for jrosh

My database table need to insert a time value in the format of hh:mm:ss ... As the input source I use JTextbox. it returns me a String. (after using .toString()) I want to convert into the type of Time(hh:mm:ss) in order to store it in my database... How can I …

Member Avatar for javaAddict
0
77
Member Avatar for jrosh

I want to have a date picker for my application. It should be really simple... I went through many examples. But all I found contains very large files (LOCs)....How can I impliment a simple calender? to pick a date and time.... (jst wanna use them in two comboboxes... to pick …

Member Avatar for javaAddict
0
86
Member Avatar for Sweet_person4

I am looking for java syntax to read an attached *.txt file which contains 3 html source code files separated by the file id as follows .IIIII 1, .IIIII 2, .IIIII 3. any help to get me started. I know how to read the who file but I am stuck …

Member Avatar for masijade
-1
29
Member Avatar for KimJack

Hi All, Is it possible to convert an arraylist of chars to an array? For example: ArrayList<Character> array = new ArrayList<Character>(); Can this be converted to an array of chars. I have tried using the toArray method but it is not working. Does anyone have any suggestions? Thanks, Kimjack

Member Avatar for BestJewSinceJC
0
225
Member Avatar for thisisnot232

I wrote this code for a small project, and I am probably declaring a method in a method, because I keep getting "illegal start of an expression." This is happening at line 27, and 43. I am fairly new to java, so please don't be to harsh. I might have …

Member Avatar for VernonDozier
0
92
Member Avatar for kahaj

I just finished this project, thought I had it done, but on line 1, it's telling me, "incorrect Package". What am I missing here? [code] import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; public class JavaNotepad extends JFrame implements ActionListener, KeyListener { boolean txtChanged = false; String fname = ""; …

Member Avatar for llemes4011
0
199
Member Avatar for Bloubul

Please help me with this assignment as well, because I am receiving a error when Running the application. The error I am receiving is: Exception in thread "main" java.lang.Error: Do not use Stock.setLayout() use Sto ck.getContentPane().setLayout() instead at javax.swing.JFrame.createRootPaneException(JFrame.java:458) at javax.swing.JFrame.setLayout(JFrame.java:524) at Stock.<init>(Stock.java:50) at Stock.main(Stock.java:36) Press any key to continue …

Member Avatar for JamesCherrill
0
185
Member Avatar for KAUL

//This program will calculate the compound interest. import java.io.*; import java.text.*; public class Program08 { public static void main (String args[]) throws java.io.IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); DecimalFormat roundMyDecimal=new DecimalFormat("0.00"); float amount; float principal; float interest; float compounds; float years; System.out.print("Enter the principal: "); // inputs principal. …

Member Avatar for KAUL
0
118
Member Avatar for Samyx

[code]class Complex { double real, img; void setValue(double i, double x){ real=i; img=x; } public double getRealPart(){ double a=real; return a; } public double getImagPart(){ double b=img; return b; } public double getMagnitude(){ double magn=Math.sqrt(real*real+img*img); return magn; } public Complex add(Complex c){ return new Complex(real+c.real, img+c.img); } public Complex multiply(Complex …

Member Avatar for Samyx
0
106
Member Avatar for mhil_joy

hello guys.. please help me! for my defense i need a system using java any system. i don't have any idea. please please help me.. or any program.. or please give me some ideas.. thank you alot..

Member Avatar for javaAddict
0
82
Member Avatar for JimD C++ Newb

Good evening! I'm working on an assignment, and I'm not seeing what is wrong with my logic here. Any assistance would be greatly appreciated. It's a basic appointment book, and if there is an appointment at the current time, I would like the "New Appointment" button disabled. However, if I …

Member Avatar for javaAddict
0
94
Member Avatar for Bloubul

I must write a interface to enter course information for transfer students. The created data file should be sequential in nature, with the student's name, his/her ID number, the course number from the previous college, and the accepted course number at the current college. The code I wrote so far …

Member Avatar for javaAddict
0
262
Member Avatar for whiteyoh

Hi all, Im fairly new to java and any assistance would be appreciated. The following should output string values, but if i use text within the creation of the new CD object i get an error, unless i change the content to numbers. I know the driver class is fine, …

Member Avatar for whiteyoh
0
108
Member Avatar for KimJack

Hi, This is a very simple question. Is it possible to print a one dimensional array into the shape of a grid? For example if I have the follow array: chars arrayofChars[] = {'A', 'B', 'C', 'D', 'E'...}; how can it be printed out as A B C D E …

Member Avatar for anupam_smart
0
158
Member Avatar for gibson.nathan

alright here are my instructions: [QUOTE]Display a menu giving the user a choice of character sets to use to construct the password. (Note: Do not use the first range of punctuation symbols with ASCII values from 33--47). 4. Allow the user to select the number of characters in the password …

Member Avatar for VernonDozier
2
1K
Member Avatar for armyofone83

I am having trouble getting my program to work I keep getting an error that says class, interface, or enum expected. What am i doing wrong?? Please help. [code] //Product.Java //Inventory program { // main method begins execution of Java application public static void main (String args[]) { public class …

Member Avatar for peter_budo
-1
164
Member Avatar for opethcire316

I have a (for me) a big perplexing problem. I am new to Java and am in a introductory class. We were suppose to create/"fix" a method for Formatting ISBN-10's. Our Professor gave us all the code and the classes but we need to implement another "design teams" code for …

Member Avatar for jbennet
0
109
Member Avatar for suriname0

Hello, I've been working on a fun project of my own. I didn't really start out with a plan in mind, but now it has turned into an attempt to make some Advance Wars type TBS game. The problem I ran into is trying to display the base "terrain" image …

0
141
Member Avatar for peter_budo

Here is simple example of static image to be displayed as logo on the start-up/splash screen. This can be improved by creating animation out of series of images or use of flash file through [URL="http://developer.sonyericsson.com/site/global/newsandevents/latestnews/newsapr08/p_project_capuchin_announcement.jsp"]Project Capuchin[/URL] library. As for location of image file this was placed in new folder called …

6
699
Member Avatar for eager to learn

I am sorry for interfering like this in between, but I am new to this community and I need some help, if anyone can spent their precious time in doing so. Hi.I am working on a Java media player that uses [B][U]Java Media Framework(JMF)[/U][/B].I have designed the code for a …

Member Avatar for masijade
1
129
Member Avatar for shiri

hi ppl. I've done 8 frames on JAVA netbeans 6.7 with the default color but now i'm required to put a background picture(image), i have no idea how..

Member Avatar for majestic0110
0
127
Member Avatar for hybridoutlaw

I have successfully completed a project that I have been working on. However, I want to clean the image up slightly. This code consists of 2 different calculators and I would like to divide them with some sort of divider. Can anyone assist? Any help is greatly appreciated. [CODE]import java.awt.*; …

Member Avatar for masijade
1
116
Member Avatar for ranjanj2me

I work on netbeans IDE i want to display applet at jsp page. My code is running when i compile and run it through console but when i do the same through net beans ide its not running so if possible then please send me a sample project made on …

Member Avatar for peter_budo
-1
76
Member Avatar for Kishorey

HI Can anyone help me for creating our own gadgets as present in google gadgets . Any help would be appreciated.

0
54
Member Avatar for keicola

I'm trying to read a file which contains: Dante Beatrice 3 5 and put them into an array. Then I will assign the values of each member of the array to static variables. when i run the main class of my project, it throws a NullPointerException starting from the line …

Member Avatar for keicola
0
238
Member Avatar for joannies

can someone help me???? give me coding for display 1 12 123 1234 1,3,5,7...n 123 456 789 help me... and give me coding for while loop generate 0,1,1,2,3,5,8 sent coding to my email [I]<snipped>[/I] thank you..for da help...

Member Avatar for freelancelote
0
147
Member Avatar for pansen24

I want to write a program for DNS query.but i want to specify the DNS server from which i want to get response.Is it possible using java? please help

0
43
Member Avatar for emilio

is there a way to convert a java.util.Date to format dd/mm/yyyy HH:mm:ss ?

Member Avatar for emilio
0
88

The End.