31,001 Topics

Member Avatar for
Member Avatar for smith345

I need to create a bank account class which consists of deposit and withdraw methods. I need to have classes that inherit from superclass, a current account and savings account and a test/driver class that calls all methods and operates the system? something like: public abstract class BankAccount { private …

Member Avatar for javaAddict
0
1K
Member Avatar for Sunshineserene

Hi, I need to do a file read and extract all the numbers in the text file to be used in my java program. However, I'm having some problem with the try and catch statement. Must the try and catch statement be in the main loop only? Can't I used …

Member Avatar for Sunshineserene
0
179
Member Avatar for sciprog1

Hello Members, My program consists of a JFrame, which opens a JDialog. At this point, the modal is "true" for the JFrame when the JDialog is opened. What I want is the following: Once the interaction with the JDialog is complete, the modal for the JFrame should be turned off …

Member Avatar for sciprog1
0
61
Member Avatar for BboyRodimus

Hey guys, I'm working on my first GUI assignment and I wanted to make sure I have the layouts finished and such before I move on to the coding for the calculations and such. Here's the instructions: (4 classes) [B]CreatePanel[/B] CreatePanel extends JPanel defined in the javax.swing package. It should …

Member Avatar for NormR1
0
131
Member Avatar for samuel17

Hi all, Having another problem with a program. I thought i had this one pretty good, i was confident about it, but no luck. The problem was with initializing a variable, i try to add in to output what the variable is and it says it needs to might not …

Member Avatar for samuel17
0
212
Member Avatar for RaigaX9

Hi, I'm having a small problem with the program that I'm doing. Here is the instructions for it: Write a program named ConvertDate that converts a date entered by the user into another form. The user’s input will have the form month day, year The month will be one of …

Member Avatar for RaigaX9
0
678
Member Avatar for Wootens

Hey guys, I've constructed this program and I have this error that I don't understand. What I'm trying to do is have a user type in a positive number and then it counts up to that number. If the number is divisible by 3 or by 5, it prints Beep …

Member Avatar for Wootens
0
171
Member Avatar for diyes05

How can i make a program that will accept a series of inputs named as inserts and arrange them in the form of binary search trees. Do you have any source codes what I can use as reference? Your help is very much appreciated! Thanks for the reply

Member Avatar for brandonrunyon
0
145
Member Avatar for kekekerush

Hi everyone, I'm just wondering in Java, if there was a way to just check once for a number in an array? [CODE]for (int i = 0; i < array.length; i++) { if (array[i]>0){ count++; } } [/CODE] This code will check for all positive numbers. Is there a way …

Member Avatar for stultuske
0
81
Member Avatar for NewOrder

2 things that i dont understand: [CODE]class BTree{ private Node head; public void add(int info){ Node node=new Node(info); if(head==null){ head=node; return; } Node current=head; while (true) { // what does this mean? where is the true value derived from? if(info<current.info){// to what number does the current.info refers to? if (current.left==null) …

Member Avatar for NewOrder
0
115
Member Avatar for javanewb101

So I'm making a smiley face. It' compiles just fine, and at the run time it says "process completed" but the applet doesn't pop up. I have absolutely no idea what's going on!! Here is the error message: java.lang.NoSuchMethodError: main Exception in thread "main" Process completed. Here is the beginning …

Member Avatar for javanewb101
0
232
Member Avatar for Juniorr

Hi, I am trying to add rows to different tables. I have found this code on the web. But this is only for one JTable. I have three tables in one JFrame. How will I modify this code to three different tables. Thanks for your help. [CODE] firstTable = new …

0
81
Member Avatar for diyes05

Hello. Does any body here has a working BST program or a tutorial on how to build one? Our prof didnt taught us how to to construct it, or even the concept of it. I am in need of a source code for our project. I badly need it by …

Member Avatar for JamesCherrill
0
94
Member Avatar for loveu
Member Avatar for JamesCherrill
0
88
Member Avatar for cretaros

if (source == loginbtn ) { JFrame frame = new JFrame ("AdministratorLogin"); frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); frame.getContentPane().add (new AdministratorLogin()); frame.pack(); frame.setLocationRelativeTo(null); frame.toFront(); frame.setVisible (true); frame.setResizable(false); //the commented dispose code will give me an error of cannot find symbol // dispose(); }

Member Avatar for JamesCherrill
0
103
Member Avatar for gheorghe gardu

Hi, I have a problem with a java application which should use ArrayLists, and I would like to ask if you can help me. I have created a Person class, and 2 subclasses, Student and Employee. Data attributes common are Name, SSN (social security number), and Age. A student has …

Member Avatar for JamesCherrill
0
100
Member Avatar for benhowdle89

Hi i've been set this assignment to design a Craps game for Java, i know this has been done lots before but i seem to be going round and round with this code....very frustrating! This is the code i've written so far: [CODE] public class CrapsGame { public static void …

Member Avatar for benhowdle89
0
145
Member Avatar for Ray007

Any idea for this an example question..? Consider the following Student class specification: public Student() //CONSTRUCTOR Initialized the attributes public String name () This Student’s name public String address() This Student’s address public String matric () This Student’s matric number public int creditHours () Number of credit hours this Student …

Member Avatar for Ray007
0
108
Member Avatar for Jake2025

Can somebody help me, i want to save the output of this program in a .csv file but i don't know how. please i need help. import java.io.*; public class TestEmployee { public static void main(String args[]) throws IOException { Employee staff[] = new Employee[args.length]; // populating the array of …

Member Avatar for Jake2025
0
117
Member Avatar for PDB1982

How can I code to restrict the users input to 5 numbers and no more or less....I can't think of a good way to do it. [code] import java.io.*; public class Palindrome { public static void main(String [] args){ try{ BufferedReader object = new BufferedReader( new InputStreamReader(System.in)); System.out.println("Enter number"); int …

Member Avatar for tong1
0
109
Member Avatar for ceyesuma

Hello: I tried to create the jar of a project on C drive I have these command with the error. Could someone help with the creation of the jar? [b][/b] [b]command[/b] f [code] C:\Program Files\Java\jdk1.6.0_11\bin>jar -cvmf [/code] [b]path to manifest.txt[/b] [code] C:\Users\depot\Documents\ceyesumma\java_cache\my_projects\guitar_master_project\target_guitar_master\guitar_master\guitar_master\build\classes\view myManifest.txt [/code] [b]intended gm.jar denied on c: and …

Member Avatar for NormR1
0
1K
Member Avatar for nunos

Hi everyone. I have an homework assignment due next week. Since I am not that knowledgeable in Java, there are many times I get stuck and find myself goggling for answers which sometimes I can't get that fast. Therefore, I would like to use this thread to post several quick …

0
86
Member Avatar for sokolovic

I've already posted similar question at [URL="http://www.coderanch.com/t/511249/GUI/java/handle-JFrame-minimize-restore"]JavaRanch[/URL] but didn't get the solution. Here is the issue: I need to detect CAPS LOCK state after minimizing and restoring frame. This is what I did: Run application CAPS LOCK is off Minimize, restore and get message "Caps lock off" Then I minimize …

0
26
Member Avatar for cooolpunit

i would like to write a program regarding the give character is vovel or consants but i am able to input the character can any one tell with full netbeans program including jTextField and all...........

Member Avatar for stultuske
0
77
Member Avatar for JoonShen

Hi guys, i need some ideas for my final project title. This is the area that I am given : Mobile Intelligent (Multi-)Agents, Distributed/Parallel Computing, Static/Dynamic Algorithm Analyser, Embedded Applications, Component-based Technology. Thanks

Member Avatar for stultuske
0
79
Member Avatar for manjukdvg

in my application i have JSP and a Java class(not servlet) ,if user clicks on the JSP it has to pass the value to the Java class , how to get the values from JSP ?

Member Avatar for stultuske
0
383
Member Avatar for jlancaster954

hi everyone, i'm looking for some help please! i'm in an intro to java class and i cant figure out what i'm doing wrong.i am getting an error message that says: Ch3_PrExercise1.java:29: ';' expected String inData.; like i said i just starting out so any help or advice is greatly …

Member Avatar for Stefano Mtangoo
0
378
Member Avatar for Olliepop

Hey guys i have a real issue I want to do these 3 things from an applet: ________ 1) Load an URL into a frame inside the browser and 2) Insert data into a form which is inside a frame in the users browser, and then submit the form using …

Member Avatar for Olliepop
0
122
Member Avatar for dpirtle83

import java.util.Scanner; public class Compute{ public static void main(String[] args){ Scanner input = new Scanner(Scanner.in); System.out.println("Enter three numbers"); double.int= v0=5.5; double.int=v1=50.9; double.int = t= 4.5; System.out.println("5.5-50.9/(4.5)"); } } i am having trouble with writing this program, what am i missing to finding the average for this , or is it …

Member Avatar for brandonrunyon
0
124
Member Avatar for 47pirates

I want to display the data stored in my database(I'm using Ms Access) when i Clicked a View button in my GUI. Everything goes smoothly, as well as even the query is executed the the values are not visible in my panel where i've added the table. Suggest me what …

0
39

The End.