32,204 Topics
| |
I just cannot figure out what is wrong, so tried. Can someone please help me so I can finish this today or tomorrow please. [code] //adds all 10 panels together this.add(mainpanel); //set see the frame setVisible(true); } JOptionPane.showMessageDialog(null,"Oringinal Balance = $" + recieveAmount + "\nPayment#" + x + "\nMonthly Payment$" … | |
I am having trouble adding the ability to order an integer array in both ascending and descending order. I have implemented the functions myself and am having trouble figuring out how to order them in reverse order. I am passing in a boolean variable to test which direction the array … | |
Hi i have been trying to get a GUI in BlueJ working properly but i hav come across a prolem, i hav 2 buttons which i want to use but when i click them the actionListener wont run my methods. In the action preformed bit i tried to make it … | |
My main.java [CODE] public static void main(String[] args) { // TODO code application logic here Rational x = new Rational (); x.num = 2.0; x.den = 3.0; System.out.println (x); Rational.negate (x); Rational y = new Rational (1.0, 3.0); System.out.println (Rational.invert (y)); } [/CODE] My rational.java [CODE] package rational; public class … | |
[code=java] import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.text.*; import java.util.*; public class Transfer extends JFrame implements ActionListener { //Declare output stream DataOutputStream output; //Construct a panel for the fields and buttons JPanel fieldPanel = new JPanel(); JPanel buttonPanel = new JPanel(); //Construct labels and text boxes JLabel … | |
In here: [url]http://java.sun.com/docs/books/tutorial/uiswing/components/toplevel.html#general[/url] It says: The default content pane is a simple intermediate container that inherits from JComponent, and that uses a BorderLayout as its layout manager. In here: [url]http://java.sun.com/docs/books/tutorial/uiswing/components/jcomponent.html[/url] It says: The JComponent class extends the Container class, which itself extends Component. This is contradictory, isn't it? Also what … | |
hello to everybody I have a linked list that contains objects each object contains two String field I want to know how to check if the object that i want insert is already exists in the linked list thank you | |
Can somebody help me in reading text from a file without using Java Class Library??? | |
I'm having trouble writing code to save binary trees that are created by my program. I'm trying to save the tree to a file by trying to use preOrder traversal and writing the data that way. But so far nothing gets written to the text file. I'm supposed to write … | |
im trying to take an inputed file and use a linked list to read it and display the most frequently used word. Anybody know how to do it? [CODE] import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.util.*; public class mostFrequentWord { LinkedList<Word> list = new LinkedList<Word>(); public void Read() throws … | |
I'm trying to wrap the following so it shows up easily on the prompt screen. How can I wrap it up? [CODE] System.out.println("Anwser the following trivia questions with a true/false input. Since I am" "a horrible programmer, you will have to enter 1 for True and 2 for False. If … | |
Hey guys! I have a program I am writing that I have gotten stuck on. It compiles fine but when I run it I get several error messages. Illegal format Conversion Exception is one of the error messages. I am stuck and I don't see where the error is. Any … | |
Hello people, Im getting an "Exception occured ---java.lang.NullPointerException" error when i try running the code below: [code=Java]public void Register(String Username, String Password, String Surname, String Firstname, String Email, String Phone) { String a = Username; String b = Password; String c = Surname; String d = Firstname; String k = … | |
From the java generics tutorial: "[CODE]List<String>[] lsa = new List<String>[10]; // not really allowed String s = lsa[1].get(0); // run-time error - ClassCastException[/CODE] If arrays of parameterized type were allowed, the example above would compile without any unchecked warnings, and yet fail at run-time." I have problem understanding why would … | |
On line no no of stars 1 1 2 3 3 5 4 3 5 1 * *** ***** *** * | |
Can Java read it's own source code? Possibly by using reflection.. or something. I would like to dynamically display the code to each method inside of my interface. Any idea how that could be acheived? Thank you. | |
Hello and thanks in advance for your time. Why is the InputStream not excepting the String path to a package containing a properties file? [code] private void writeBtnActionPerformed(java.awt.event.ActionEvent evt) { String path="/view/resources/projectnames.properties"; String txtIn=writeTxt.getText(); PropertyWriter pw = new PropertyWriter(); try { pw.StreamToString(path, txtIn); } catch (IOException ex) { Logger.getLogger(WriteContentTab.class.getName()).log(Level.SEVERE, null, … | |
Hi, I'm trying to find a way for the user to draw an image on the screen, and then return a formal version of the image. This is a tool to enable practise writing symbols from an ancient language. What I mean by a formal version is the properly drawn … | |
Ihv writtten a prog of file searching and the result is to be displayed in table Im geting exception of stringindexoutofbound: String index out of range: -1 at java.lang.string.substring(unknown source) if i changed the path E:/ to e:/programs (program is some folder) then prog run correctly but i want to … | |
Hello, I have tried to solve this problem but I cannot, its been over a week. I need help in designing the solution for this problem. I need to make a system of food processing, food is inputted to machines, where it is processed and packed. If you can contact … | |
[CODE] import java.util.*; import java.util.Scanner; public class InputconsoleArray2 { public static void main(String args[]) throws java.io.IOException { int[] a=new int[100]; // create an array of type interger size // Objects of type Scanner are useful for breaking down formatted input into tokens and // translating individual tokens according to their … | |
Hey guys ........plz can you suggest me any project wic uses simple java and sql and may be connectivity between java and sql I am in 12th standard and want to make a good project related to above items...................... | |
Produce THREE buttons using SWING package. Each of the three buttons will react according to their respective tooltips. - Button A: set to Enabled and show the tooltip "Click this button to enable the Button C.” After this button is clicked, it should disable itself and Button B. - Button … | |
Write a program that will determine whether a deparment store customer has exceeded the credit limit on a charge account(5000$). The customer gives you his/her account number, he/she has a beginning of the month balance, the program should total all the purchases by the customer for the month, total any … | |
I am having problems persisting a ManyToMany relationship using Toplink and entity objects created automaticaly by Netbeans. I have attached the relevant entity objects as Data.zip. My problem is this: Chapter and Strand have a ManyToMany relationship as you can see in the entity objects. A strand contains multiple chapters … | |
I am trying to read a textfield. I am using the string=textfield.getText() notion, but all I get a is a blank string back. I am using netbeans and I am using the gui designer within it. I want to hit the "create grid" button and have it create a grid … | |
Hi im writing a program using arrays but im not sure what to do. I think i have the first three methods done correctly but i cant figure out how to do the rest. Im also supposed to write an application file but im not sure how to with arrays. … | |
hello can you help me i want to make my program to executable file is there a software for this to create a jar file?...hoping for your positive responds... | |
Hi, I'm having problems with decryption of a string when it's long. The following are my codes for encryption and decryption. It works well when the string is short (20 chars) but throws an exception when it is about 30 chars. The problem I have is that when I tested … | |
Hello, I have got two arrays one called NB(number of memory blocks) and the other called NJ(number of Jobs). I want the NB arrays to search through the jobs and find a job that is <= to the block. So for example if i had: [B]Blocks[/B] 800 300 750 200 … |
The End.