32,204 Topics

Member Avatar for
Member Avatar for Swingjohn

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

Member Avatar for Swingjohn
0
87
Member Avatar for seacase

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 …

0
113
Member Avatar for mincus

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 …

Member Avatar for llemes4011
0
141
Member Avatar for pateldeep454

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 …

Member Avatar for harry010
0
640
Member Avatar for KSUliz

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

Member Avatar for KSUliz
0
130
Member Avatar for johndoe444

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 …

Member Avatar for BestJewSinceJC
0
90
Member Avatar for yacin87

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

Member Avatar for vchandra
0
83
Member Avatar for achieve_goals

Can somebody help me in reading text from a file without using Java Class Library???

Member Avatar for achieve_goals
0
92
Member Avatar for JainishP

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 …

Member Avatar for JainishP
0
2K
Member Avatar for help_please

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 …

Member Avatar for BestJewSinceJC
0
90
Member Avatar for java=hard

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 …

Member Avatar for BestJewSinceJC
0
106
Member Avatar for jtodd

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 …

Member Avatar for jtodd
0
138
Member Avatar for oggiemc

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

Member Avatar for oggiemc
0
236
Member Avatar for johndoe444

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 …

Member Avatar for johndoe444
0
101
Member Avatar for anjal_pawar
Member Avatar for Virux

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.

Member Avatar for Virux
0
154
Member Avatar for ceyesuma

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

0
37
Member Avatar for Serrafine

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 …

Member Avatar for Serrafine
0
215
Member Avatar for laveena

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 …

Member Avatar for laveena
0
164
Member Avatar for ben1

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 …

Member Avatar for ben1
0
144
Member Avatar for aomran

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

Member Avatar for javaAddict
0
233
Member Avatar for Ron2794

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

Member Avatar for stultuske
0
181
Member Avatar for ganesh5155

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 …

Member Avatar for stultuske
0
233
Member Avatar for dorotalp91

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 …

Member Avatar for stultuske
0
118
Member Avatar for mmxbass

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 …

0
78
Member Avatar for DarrelMan

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 …

Member Avatar for moutanna
0
120
Member Avatar for amanv

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

Member Avatar for amanv
0
126
Member Avatar for jemz

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

Member Avatar for Ezzaral
0
76
Member Avatar for z_jun

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 …

0
32
Member Avatar for black_berry

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 …

Member Avatar for BestJewSinceJC
0
78

The End.