32,204 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 = ""; … | |
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 … | |
//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. … | |
[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 … | |
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.. | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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.. | |
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.*; … | |
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 … | |
HI Can anyone help me for creating our own gadgets as present in google gadgets . Any help would be appreciated. | |
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 … | |
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... | |
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 | |
is there a way to convert a java.util.Date to format dd/mm/yyyy HH:mm:ss ? |
The End.