32,204 Topics
| |
I have to display the following pattern using a loop: @@@@@@@@@& @@@@@@@@&& @@@@@@@&&& @@@@@@&&&& @@@@@&&&&& @@@@&&&&&& @@@&&&&&&& @@&&&&&&&& @&&&&&&&&& I have the following program that is using a loop but it displays 9 rows of 10 @ symbols instead of incorporating the & symbols. What do I need to do … | |
hey guys i'm having problem to my code in MAGIC SQUARE [B]Output of my current code[/B] 0 1 8 7 5 3 2 9 4 it's a little bit confusing.. the 6th digit turn to [B]0[/B] any help will be much appreciated :) thanks in advance [CODE] import java.util.Scanner; public … | |
This program is supposed to display a frame with a label that contains an image,two buttons, and a text field. When the user clicks the button the image is supposed to change. I know I don't have the code for the change in the text field. I am just trying … | |
I'm supposed to create a factorial application that prompts the user for a number and then displays its factorial. The factorial of a number is the product of all of the positive integers from 1 to the numbers. FOr example, 5! = 5*4*3*2*1 | |
Hi. So here's my code [CODE]public class TextFileIO { static Console c; // The output console static int total; public void askData () { int line = 0; int i; c.print ("Enter the number of words you're going to input: "); total = c.readInt (); File dataInput = new File … | |
[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 … |
The End.