32,199 Topics
| |
[CODE]/** Programmer: Jennifer Mercer Date: 12/12/2011 Course: PRG/420 File: Calculator.java Requestor: Dwain Hammer Billings MT Request Description: Write the program in Java (without a graphical user interface) and have it calculate the payment amount for 3 mortgage loans: - 7 year at 5.35% - 15 year at 5.5% - 30 … | |
I am trying to make a storyboard program, but I am having trouble displaying the currect amount of windows per page. my basic program looks like this [] = button to open editor [+] = add new button [>] = next page [<] = previous page Frame [] [] [] … | |
Hi. So my problem is that my loop doesn't stop. Here's my code. [CODE]public void askData () { String word; String stop = null; int line = 0; File dataInput = new File ("dataIn.text"); c.println ("In order to stop, just leave it blank."); c.println (); while (true) { try { … | |
hello! i want to learn mobile applications using java.i know java and wana learn that now. please can anyone tell that how to learn and links or books to refer ?? | |
can anyone explain me this concept that "static members of a class can access only static variables?" any simple code as an example to show this? | |
Hello, To get right to the point i would like to ask for some suggestions regarding writing Java GUI applications. I have so far only done small GUI or Console applications that consisted of max 2 classes aka. 2 files. But now while back i decided to take on a … | |
I am trying to implement an enrollment organizer for a university but I would ask how to implement the aggregation relationship in Java. this relationship exist for academicStaff class and the supervisor class in which the academicStaff (e.g prof.) can be a supervisor to multiple courses in a specific semester. … | |
I have Java final test tomorrow it is my first time learning and I don't know when to use some code or how to use it ? I have prepared the questions that I don't know can you answer them please 1-how can I know that I need an array? … | |
Hi there, I am trying to display three Attributes assigned to each "Student" which variables are defined in my 'Student' Class. In my show student class, I can get the user to decide how many Students they would like to add, and i also get the user to input the … | |
I realise some members have discussed this topic before but it seems quite complex. I'm starting Java and have a longterm goal of creating an internet messanger for school computers. I was just wondering what the pseudocode of this project/task would be. Thanks | |
The issue with my program is that it does not calculate how many times the specific value has occurred. I believe that I have everything in place, but I'm not sure to as why it wouldn't work. Any help and/or feedback is kindly appreciated. Thanks! Ok, so basically this program … | |
I couldn't save the new things when i tried to pass in new value inside inner class. The error message is local variable item is accessed from within inner class; needs to declared final. Guide me please. thanks in advance [CODE] public class Broadcast{ protected String title; public Broadcast(String title){ … | |
[CODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Test extends JFrame implements ActionListener { JTextField t1=new JTextField(10); JTextField t2=new JTextField(10); JTextField t3=new JTextField(10); JTextField t4=new JTextField(10); JTextField t5=new JTextField(10); JTextField t6=new JTextField(10); JButton b1=new JButton("MakeReservation"); JButton b2=new JButton("DeleteReservation"); JButton b3=new JButton("searchReservation"); JButton b4=new JButton("printResrevation"); JButton b5=new JButton("clear"); JButton b6=new … | |
Below is what I have been attempting to do. [code]retrive number of rows from MySql table; for(int i = 1; i <= numberOfRows; i++){ retrive userID, level at position(i) in table; // next i need to insert userID into array, level amount of times (ex. userID = 4, level = … | |
I get an error "Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.JButton cannot be cast to javax.swing.JPasswordField at def3.password$MyActionListener.actionPerformed(password.java:103)" in the following code, what am I doing wrong? [CODE]static class MyActionListener implements ActionListener { private String userInput = "username"; private static final String passText = "password" ; JFrame frame ; MyActionListener(JFrame f){ … | |
The issues with this program are: 1. File: D:\Unit 3 Data Type, Objects, Assignments\CreditCardBill.java [line: 20] Error: Type mismatch: cannot convert from double to int 2. File: D:\Unit 3 Data Type, Objects, Assignments\CreditCardBill.java [line: 21] Error: Type mismatch: cannot convert from double to int EDIT: I have tried type casting, … | |
What are the API's I have to use for making a online radio station through Java/Jsp..? | |
I am trying to create a menu GUI. I think I am having problems with the action listeners Any help would be great. Thanks Write an GUI application that display a menu system. The menu system should allow the user to select one package, one phone, and any of the … | |
Hey guys, I'm currently at the very end of my java course this semester, and I was wondering if anyone could help me finish the last 3 of my 8 method in a program called Mastermind. The difference between typical Mastermind games and my assignment is that we're using numbers … | |
Hi there, My question is how could I output byte value (meaning zeros and ones) to screen. I just want to try some shifts and see how it works. | |
Hello, I am writing a program that creates a tree (similar to BST) where each node is made up of an arrayList (which is limited to a certain number of items each node) and 2 pointers (left and right children) The strings are made up of 0 and 1. The … | |
Hi, I am having a problem with this program. I don't know why the counter won't work correctly. After "doctor is out" is clicked the inCounter should be zero. So when the "doctor is in" is clicked "the doctor is in" should be displayed, but "the doctor IS IN, Already!" … | |
Need some help fixing the errors in my code, im TRYING to make a math expression type of program, using stacks. Was running fine, then i wake up in the morning and my code has like 15compiler errors, would appreciate any help!! [code] import java.util.*; import java.io.*; public class d8 … | |
Even after I set a for loop in my constructor I receive a null pointer exception any ideas why? here is a bit of the code [CODE] private String[] ingredientName,units = new String [40]; private double[] ingredientAmount = new double [40]; public Recipe() // Recipe Constructor example { for(int setVals … | |
hi, I am wanting to rotate an image 90 degrees when you press a button. However so far i can only get it to rotate once, and then it stops. I've tried rotating the image on its own and using the label to rotate it Here is my code BufferedImage … | |
I've made a small program that draws black rectangles on a JPanel at random places. I would like to give the user the option to save this JPanel as a .gif file, but I'm not sure where to start. The function I need to write is SaveJPanelAsGIF below on line … | |
I've done some searching, and it seems a few people have asked similar questions, but none of them were quite what I was looking for. I need to be able to read lines of code from a .txt file, and then execute them in Java. Or, if that's impossible, would … | |
Hi!! my application have 2 frames including tabel 1,tabel 2 when run time i insert values though textfileds to tabel 1 ,after inserting 5 or more then i click next button then display other frame with tabel 2 and tabel 2 must auto filled. my problm is last row(i already … | |
Hi, I'm new to Java, getting compiler error for the following code: class A { int x; A (int a) {System.out.println ("class A");} } class B extends A{ int x; B() {System.out.println ("class B");} public static void main (String[] args) { A a= new B(); } } The compiler error … | |
Is there a "neater" way to code the following? (It prints the 5 data elements in an array.) System.out.println("All the values in the array are: "); System.out.println(+ array1[0]); System.out.println(+ array1[1]); System.out.println(+ array1[2]); System.out.println(+ array1[3]); System.out.println(+ array1[4]); Thanks, Bud |
The End.