32,205 Topics

Member Avatar for
Member Avatar for iZander

I've been having problems with my form program while trying to call data entered into a text field and displaying in a GUI after pressing a button. Here's my code. [CODE]import java.awt.*; import java.awt.event.*; public class ProjectForm { public static void main(String[] args) { Frame frm=new Frame("Personal Information Form"); frm.setSize(350,200); …

Member Avatar for javaAddict
0
91
Member Avatar for Jeun

/*None of the buttons except create and clear work can someone help please , can anyone help me with the parts i have missing , the account and date test class work fine i just need the bank account GUI to work properly , here is a detailed explanation of …

0
151
Member Avatar for extemer

i got a problem wana display my String but it doesnt work here is my code i dont understand why it doesnt print me anything..... [code]class StringDemo { public static void main(String[] args) { String s1,s2,s3,output; s1=new String("hello"); s2=new String("hello guys"); s3=new String("happy birthday"); output="s1 = " +s1+ "\ns2 = …

Member Avatar for extemer
0
109
Member Avatar for ppllmmnn

[CODE]import java.io.*; import java.util.*; public class UMUC { public static void main(String[] args) throws Exception { String s1 = "input.txt"; String s2 = "output.txt"; try { FileReader fr = new FileReader(s1); BufferedReader br = new BufferedReader(fr); String lineRead = br.readLine(); while(lineRead != null){ s2 = s2 + "\n" + lineRead; …

0
34
Member Avatar for bondgirl21

Hi, I am having problems counting the number of words in a text file that i created (it has 130) and printing that finding (number) into another text file (output)....Any help is welcomed. I have this, but it doesn't print anything out yet...am stuck. [CODE]import java.io.*; public class FileIO{ public …

Member Avatar for bondgirl21
0
182
Member Avatar for wrongo

I have 2 objects called X and Y created from a class called Product which has a field called numInStock. From another driver program, I want a user to input either X or Y with their response being stored in a string userchoice (so user enters X or Y as …

Member Avatar for IsharaComix
0
92
Member Avatar for byimam

Hi all, I am undertaking a project that will extract information like verbs and nouns from requirements and map those part of speech to architectures or components. How can I develop such tools in java. I desperately need your help! cheers Badamasi

Member Avatar for Ezzaral
0
32
Member Avatar for help_please

Hey guys, Im having trouble adding an imported string file to a linked list (the purpose of the assignment is to find the most frequently used word) here's my code: (my problems in the mostFrequent class so you dont really have to look at the other classes. i just provided …

Member Avatar for JamesCherrill
0
137
Member Avatar for ceyesuma

Hi. I am having problems connecting and the use of DAO Could someone start me off to find problems that are conceptionally wrong with the structure? [b]error [/b] if the connection is made and database is built (DerbyDAO) then the InstructorDao SHOULD become JDBCSchoolofdbDAO and return "profile" which will allow …

Member Avatar for ceyesuma
1
153
Member Avatar for ceyesuma

hi. I can't figure out why other properties are found but this one is not. [code] the key: strCreateAdminTable Exception in thread "main" java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key strCreateAdminTable at java.util.ResourceBundle.getObject(ResourceBundle.java:384) at java.util.ResourceBundle.getString(ResourceBundle.java:344) at model.ModelUtils.getResource(ModelUtils.java:48) at model.dao.DerbyDAO.createTables(DerbyDAO.java:185) [/code] can I build a table with this one? or …

Member Avatar for ceyesuma
0
114
Member Avatar for msr

Hello, I need a sorted stack/queue. I mean, the element removed from the stack must be the one with great priority. Stack dimension varies a lot (becomes bigger very fast). I need also to search and REMOVE elements in that stack. Does Java give some good implementation for this? What …

Member Avatar for ~s.o.s~
0
91
Member Avatar for bondgirl21

Hi , I have created a submit button "sbutton" that should take all totals from 3 boxes and if that total is greater than 1, then it should be subtracted from 1 and the remainder is suppose to be displayed as change...this is what i have [CODE]public void actionPerformed(ActionEvent evt) …

Member Avatar for bondgirl21
0
120
Member Avatar for mckrm

i am tired of opening my java applications through IDE s i wouuld like to know all the possible ways of opening my applications without having to write any thing in command prompt i found two i can make a .jar file or a .bat file are there other ways …

Member Avatar for mckrm
0
80
Member Avatar for NinjaLink

Hello, I am having a difficult time getting my Binary Search Tree class to compile. I added 2 functions "add" and "search". Before I added the 2 functions. It compiled successfully. If someone can help me in the right direction. I will definitely appreciate it! [B]2 Functions:[/B] [CODE=Java] public BTNode<E> …

Member Avatar for NinjaLink
0
116
Member Avatar for jordanhagen

Hey I'm having trouble with this program, for some reason im stuck and dont know what to do. If you could help me out that woud be great. What i have to do it this. Using classes, arrays, sorting and searching write a java program to manage an online address …

Member Avatar for javaAddict
0
1K
Member Avatar for gunjannigam

I have a class which extends JPanel and implements ActionListener. I am having 2 menuItem. When I implemented the abstract method actionPerformed(ActionEvent e) and used repaint if the event source are the menuItem paint method is not called. What can be the possible reasons? This is what I am doing …

Member Avatar for JamesCherrill
0
112
Member Avatar for padmaanand

[CODE]import java.io.*; class ArrayGet { int[] a = new int[20]; void FindMin(int[] a) { int min=a[0]; for(i=0;i<=10;i++) { if(a[i]<min) min=a[i]; } System.out.println("Thr smallest element in the array"+min); } void Display() { for(int i=0;i<10;i++) { System.out.println("The elements in array are "+ a[i]); } } void GetMethod() { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); …

Member Avatar for javaAddict
0
141
Member Avatar for budstar

Help, I cannot work out how to get my loop to continue until the user enters in 0. If the user enters 1 then the loop needs to continue until there is no more groups to enter which is the point the user enters a 0 [code]import java.util.Scanner; public class …

Member Avatar for stultuske
0
79
Member Avatar for motinade

Please help, as I do not know what I have done wrong. Error: illegal start of expression, and ; expected. [code] import java.util.ArrayList; import java.util.List; public class Employee { public static void main ( String args []) { //unique identifier int empID; String firstName; String lastName; double salary; //not sure …

Member Avatar for stultuske
0
1K
Member Avatar for k2k

would anyone please take a quick look? this always return false for some reason... the database connection is fine and the query is fine... it actually returned the right password from the database. please see below [code] public boolean passCheck(String login, String pass) { String realPass=""; try { String query …

Member Avatar for stultuske
0
147
Member Avatar for java=hard

I recently completed a "fun" program where it asks the user questions and outputs answers. I submitted it and my professor said all was great, except he wanted me to implement methods into the program. I have NO idea how o do the methods. Can someone use my code to …

Member Avatar for JamesCherrill
0
142
Member Avatar for gonzi.p12

Hi guys, I am using MyEclipse....I have even import the itext.jar file to my project folder....still I am getting error in my java code.... Error in resolving import com.lowagie.text.html.*; import com.lowagie.text.pdf.*; Can anyone help me.............

Member Avatar for mintie
0
4K
Member Avatar for tbone2sk

I'm putting together the basic layout for a contacts book, and I want to know how I can make the 3 test buttons span from edge to edge just as the arrow buttons do. [CODE]import java.awt.BorderLayout; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.Box; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; …

Member Avatar for tbone2sk
0
129
Member Avatar for jjonesmu

I am making a Pong game and I am having trouble making the paddles move. I have already drawn them onto my content pane and I want to use a key listener to make them move. I have heard about using key binding, but I do not understand the tutorial …

Member Avatar for Ezzaral
0
1K
Member Avatar for john2342

Hi, i need a like bit of help on understanding how this code actually works. this program basically encodes files, but can someone tell me what these three methods actually do in short detail? [CODE]import java.io.*; import java.util.*; public class BWTEncoder { private int _blockSize; private byte _block[]; private BZTableEntry …

Member Avatar for javaAddict
0
78
Member Avatar for msr

Hello, I would like to have a PriorityQueue whose elementes are instances of different subclasses. For example: Event is an abstract superclass. Event1, Event2, Event3 are subclasses. Xpto<> is an interface and PriorityQueueXpto<> is a class that implements Xpto and extends PriorityQueue. [CODE]Xpto<? extends Event> a = new PriorityQueueXpto<????>();[/CODE] Is …

Member Avatar for msr
0
100
Member Avatar for senormateo2011

[B]Redo the Lucky Sevens dice-playing program so that it uses dice objects. That is, design and implement a Dice class. Each instance of this class should contain the die's current side. There should be an accessor method for a die's current value. The method roll is the only mutator method. …

Member Avatar for charlieruns
0
828
Member Avatar for hsncvs

Excuse me if it is a silly mistake but i am newbie to java and couldn't figure it out. Basically it searches if txtText (text area) contains the txtSearchParam (text field) and returns the number of txtSearchParam in txtText. Algorithm is working. simply i can't access variables defined in main …

Member Avatar for hsncvs
0
3K
Member Avatar for whoadiz

Hey guys, trying to create a binary search tree (BST) and I dont know why but the program is not reading my insert method? When I am testing it, it shows that I did insert the number, yet when I do a check to see if the tree is empty …

Member Avatar for cale.macdonald
0
133
Member Avatar for yohanus

I keep geting the following errors for my code while compilling can any one give me some dirrection on wha i have done wrong? C:\Documents and Settings\Mark Standerfer.DESKTOP\My Documents\Inventory2.java:117: class, interface, or enum expected System.out.printf("\n\nItem Name: %s\n",s.getItemName()); //display item name ^ C:\Documents and Settings\Mark Standerfer.DESKTOP\My Documents\Inventory2.java:118: class, interface, or enum …

Member Avatar for masijade
0
321

The End.