32,199 Topics

Member Avatar for
Member Avatar for jmercer23

[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 …

Member Avatar for NormR1
0
493
Member Avatar for sirlink99

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 [] [] [] …

Member Avatar for sirlink99
0
141
Member Avatar for Daigan

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 { …

Member Avatar for Daigan
0
167
Member Avatar for gourav1

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 ??

Member Avatar for nHulk
0
120
Member Avatar for gourav1

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?

Member Avatar for gourav1
0
104
Member Avatar for n3red

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 …

Member Avatar for JamesCherrill
0
230
Member Avatar for creative_m

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. …

Member Avatar for JamesCherrill
0
188
Member Avatar for sk8ergirl

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? …

Member Avatar for hfx642
0
118
Member Avatar for tleverington1

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 …

Member Avatar for tleverington1
0
2K
Member Avatar for BlackStar0703

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

Member Avatar for BlackStar0703
0
316
Member Avatar for JavaPrograms

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 …

Member Avatar for bibiki
0
469
Member Avatar for bRyANthen

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){ …

Member Avatar for JamesCherrill
0
196
Member Avatar for nasimalotaibi

[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 …

Member Avatar for stultuske
0
343
Member Avatar for oldezwe

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 = …

Member Avatar for stultuske
0
230
Member Avatar for ethio

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){ …

Member Avatar for stultuske
0
826
Member Avatar for JavaPrograms

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, …

Member Avatar for zeroliken
0
4K
Member Avatar for sagar128

What are the API's I have to use for making a online radio station through Java/Jsp..?

0
46
Member Avatar for ravsau

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 …

Member Avatar for ravsau
0
412
Member Avatar for CollegeBeginner

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 …

Member Avatar for CollegeBeginner
0
979
Member Avatar for IcantC

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.

Member Avatar for IcantC
0
10K
Member Avatar for whoadiz

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 …

0
84
Member Avatar for bmichelle510

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!" …

Member Avatar for bmichelle510
0
230
Member Avatar for enrichedd

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 …

Member Avatar for hfx642
0
169
Member Avatar for vaironl

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 …

Member Avatar for hfx642
0
144
Member Avatar for thehorseman123

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 …

Member Avatar for thehorseman123
0
95
Member Avatar for VernonDozier

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 …

Member Avatar for ferwerda
0
414
Member Avatar for Lemony Lime

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 …

Member Avatar for NormR1
0
3K
Member Avatar for inamul20

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 …

Member Avatar for JamesCherrill
0
235
Member Avatar for arias36028

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 …

Member Avatar for JamesCherrill
0
271
Member Avatar for Bud4java

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

Member Avatar for peter_budo
0
249

The End.