32,204 Topics
| |
Need help with making this work. I can't get the System.format (prepayment) to work. class Mortgage { static NumberFormat fmat = NumberFormat.getCurrencyInstance(); public static void main(String args[]) { String input_amt = JOptionPane.showInputDialog("Enter loan amount: "); double loanAmount = Double.valueOf(input_amt).doubleValue(); String input_rate = JOptionPane.showInputDialog("Enter rate: "); double interestRate = Double.valueOf(input_rate).doubleValue(); String … | |
:confused: Hi, I have this homework to do and I have to solve a method called: public Collection toCollection(). Here is what i solved so far: final class InventorySet { private Map _data; int thesize; InventorySet() { // TODO _data = new HashMap(); } /** * Return the number of … | |
i need to a sub class for the boat rental but i am not sure how to do it i will give the code and it needs to inherit to the parent class can somw help out | |
hia, the below program is a Simulation of Producer-Consumer Problem using Race Condition.Please can anyone help me to finish this program in java language.Thanks a lot lux melxxx Producer/Consumer code int BUFFER_SIZE = 100; int count = 0; void producer(void) { int item; while(TRUE) { produce_item(&item); if(count == BUFFER_SIZE) … | |
Hi everyone, I am trying to export a jcomponent as an image. The program all works but seriously the the quality of the saved image is really disgusting. The words seems to be blurred. I think i have to use rendereing hints but i am not sure how there work … | |
Hi everyone, I am trying to use the kernel class to brighten and blur jpeg images but it does not seem to work although the the program compiles without any errors. Here is the function i use to sharpen my jpeg images public BufferedImage imagesharper(BufferedImage SourceImage2) { BufferedImage Image4 = … | |
Hi everyone, I am trying to do a simple copy and paste function for a jtable I am sometimes able to copy and the paste function does not work at all. The class i have implements the ClipboardOwner. I am using the default table model as the model of the … | |
Hi everyone, I am trying to rotate a jpeg image but it seems that the image gets clipped and there seems to be an ugly black rectangle drawn behind the image after it has been rotated by me. I am really not very sure what i am doind wrong. Here … | |
double prepaymentAmt = Double.valueOf(input_prepayment).doubleValue(); This is what I have and is not working: String message = String.format("Loan Amount:"+" "+fmat.format(loanAmount)+"\n"+ "Interest Rate:"+" "+ interestRate +" %% \n"+ "Term:"+" "+years+" years\n\n")+"\n"+ "Prepayment: "+" "\n"; | |
hi i have problem with link through in hotmail the email is from times online if i click on link line i cant get news and on the botton of the page it showes javascript:openwith( thats all that happens thanks in advance humph | |
I am getting the following syntax messages: `illegal start of expression public void display_menu()` (with arrow pointing to the 'p') and also `';' expected } (with arrow also pointing to the })` This is my code for the first error: public class InsyStudent extends Student { public InsyStudent( String fName, … | |
i dont know exactly why constructors are being used, it is used in what purpose? | |
hi, i am doing a project on steganography,and here ,i've gotta browse and then display images in the window.i dont know how to get the image as it is an application and not an applet.hence,i cant use getImage().plz help me. | |
Hi everyone, I am trying to write a simple program in which i can either mak an image sharper or darker. The thing is my program always crashes when it is run although it compiles without any errors. The error is as follows: An unexpected exception has been detected in … | |
I am trying to develop an application that can display four clocks in a frame that update at the following intervals: 1 second, 5 seconds, 30 seconds and 60 seconds, here is the code so far. Timer.java import javax.swing.*; public class Timer extends Thread { private int waitTime; private JPanel … | |
:confused: I'm going to use a tertiary tree to navigate through a series of photos. This will hopefully allow someone to "walk" through these photos as if on a tour. I was wondering if anybody had any advice on tertiary trees, do I just construct them as you would a … | |
I have a small problem with doing calculations in one java class and trying to refer to the varibles in another class. I have written a GUI program that performs certain calculations and then when a button is pressed, the values obtained are saved as variables in another Java class … | |
hello, please if someone can tell me how to start and find how to program feature to cellular. i want to write some program to download to cellular and work with it. please help me | |
Hello: I am a student and am attempting to write a multidimensional array for a Mortgage Calculator program. We have to display three different mortgage's that display 3 different interest rates and term years that show the calculated mortgage payment amount. I have the following code and am receiving many … | |
hello guys, i have a manipulation screen using Jinternal Frame which is a child frame accessed from the main frame. the child frame has save command wherein updates for a specific record is made. i use ActionListener event in the save button but i dont know exactly what codes will … | |
:sad: I am overwhelmed and need help. I am trying to write object oriented programning using Java code. 1st Class contain variables for firstname, lastname and SSn as string. 4 different class scores as integers with different weights for the depending upon the course. I've also included set and get … | |
Hi all, I am new to Java, I have been playing a video file using Java JMF in applets but am unable to play it in a browser, the program runs well while using appletviewer <filename>. I am worried about it :cry: , it is really very important for me … | |
I have been writing a Gui in JBuilder 3 which has 3 textFields for data input. I then want the Gui to perform a calculation and print the inputed data along with the calculation into a textArea, but when I click on my "compute" button nothing happens. Does anyone have … | |
[color=royalblue]Okay, if I could, I would shoot my CS teacher, and then shoot myself. Reality check. Done. Anyways, check out this yucky program right here...I don't even know where to begin...we need to create a new drawing pad; and by using two methods, we would have to create this illusion … | |
Hi everyone, I have a question about the graphics 2d. I have a buffered image which i read in and what i want to do is to draw a simple black line around this image something like a simple border(nothing fancy). This is what i have so far Dimension Size4 … | |
I posted this on devshed.com's forums, but I have gotten no replies :sad: . I am working on a program that reads data values from a file and uses them to compute the output. It is a tapemaker program that figures out how many minutes and seconds the songs take … | |
Hi, Firstly, thanks for letting me join. Hopefully you guys can help me and vice versa. I've just started a project creating a virtual map. This map will allow uses to walk around a town using digital photographs. I was just looking for some advice as I cant decide whether … | |
Hi, just wondering if anyone could help with a little problem. I'm designing a GUI that models the behaviour of a gas turbine engine. I need to add a graph i have scanned into my computer onto the GUI frame, and also use the mouse cursor to click on the … | |
How do i debug the application attached consisting of four Java classes [code] *************** Pictures of screen shots to go here ***************** Color.java public class Color extends Object { private String color; public Color() { return setColor( "" ); } public void setColor() { color = "black"; return color; } … | |
Need a hand with some method logic here, I got all the code written but I am having an issue trying to get this logic to work. These two methods are designed to simplify fractions and convert improper fractions to mixed numbers ( two seperate methods). Take a look and … |
The End.