- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 34
- Posts with Upvotes
- 34
- Upvoting Members
- 23
- Downvotes Received
- 4
- Posts with Downvotes
- 4
- Downvoting Members
- 4
132 Posted Topics
Re: Hi [QUOTE]so now it outputs: 16288.95[/QUOTE] I suppose that this value is for 11 year Yet I suppose that your poste need some explanation before starting the discution: [QUOTE]Suppose that the tuition for a university is $ 10,000 this year and increases 5% every year[/QUOTE] Is the 5% based on … | |
Re: c++ the complete reference 5th edition the 4th edition is downloadable from the link http://www.gecassets.org/ebooks/C++_herbert_schildt.pdf Hop this helps. | |
Re: Sorry but you could not run the .java file. you should build the jar file from netBeans IDE and look to the out put. after building the jar the ouput will show you the command line to use. You can also use the commande line to build the jar file … | |
Re: Hi, [QUOTE]The above has no compliation error. But it is not working as expected. Please advise how it needs to be written.[/QUOTE] There must have a compilation error! Some thing like: ')' expected the number of opned and closed bracket are not equals. [CODE]if [COLOR="Red"]([/COLOR]!input.equals[COLOR="Red"]([/COLOR]"Apple"[COLOR="Green"])[/COLOR]|| [COLOR="Red"]([/COLOR]!input.equals[COLOR="Red"]([/COLOR]"Orange"[COLOR="Green"])[/COLOR][COLOR="Green"])[/COLOR] { System.exit(1); } [/CODE] … | |
Re: Check on: [url]http://java.sun.com/docs/books/tutorial/[/url] | |
Re: Hi, Check on this [URL="http://wwwcgi.cdf.toronto.edu/~www1/programs/BubbleSort/BubbleSort.java.html"]link[/URL] Hope it helps. | |
Re: Hi, What you will get is NullPointerEception because the "message" variable is null the instruction that cause the exception follows (in the Client class): [CODE]while(!message.equals("bye"));[/CODE] try to initialize it. Hope it helps! | |
Re: Hi. At first glance it seem that the array [B][COLOR="Red"]b1 [/COLOR][/B]is declared many times: in the class [QUOTE]JButton b1[];[/QUOTE] . in the default constructor. [CODE] JButton b1[]=new JButton[52]; [/CODE] in the actionPerformed method: [CODE] JButton b1[]=new JButton[52]; [/CODE] and in the run method [CODE] JButton b1[]=new JButton[52]; [/CODE] Please try … | |
Re: Hi At first glance there is some syntactical errors here: [CODE]public static int findMinimum(int minimum) { int min = 0; if (minimum < min) min = minimum; return min; public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source == cButton) ranVal + choose; lowVal + min; hiVal + … | |
Re: You could not create a new class inside a method. You can implement an abstract class or an interface inside a method. | |
Re: Hi [QUOTE]Is there a way to listen to key events outside a window? [/QUOTE] As far as I now it is not possible to listen to even outside window using Java. This could be done by using JNI . | |
Re: there is some missing class in you poste so I could not compile you code but please try this modification: [CODE] public Object[] toArray() { ArrayList<T1> al = new ArrayList<T1>(length); PriorityNode<T1,T2> cpn = head; for (int i = 0; i < length; i++) { al.add(cpn.getData()); cpn = cpn.getNext(); } return … | |
Re: You need this : [CODE] List<Task> readTasks = read.readTasks("/tasklist.xml"); [/CODE] Hope it helps. | |
Re: Hi The rise in the egale function in the Title class: [CODE] public boolean equals(Object other) { [B][COLOR="Red"]Tile temp = (Tile)other;[/COLOR][/B] return tempText.equals(temp.getText()); } [/CODE] You could not cast the button to Title Object: May be you should do this: [CODE] public boolean equals(Object other) { JButton temp=(JButton)other; return tempText.equals(temp.getText()); … | |
Re: But your jar file does not contain the "Sentence" resource! if you look to the structure of your project you will configure out that the "folder" Sentence is external to the project and when you build your jar it will not contain that "folder" Sentence. If you whant the "Sentence … | |
Re: Try to use Java Media Framework (JMF). Try [URL="http://java.sun.com/javase/technologies/desktop/media/jmf/"]this link[/URL] Hope it helps. | |
Re: Hi. At first glance it seem that the error is caused by this instruction: [CODE] ImageIcon(getClass().getResource("bug.gif")); [/CODE] Can you please tell where you put the "bug.gif" file? | |
Re: Hi. It is a common good practice; when working with swing; to keep in mind that the swing component exceutes in there own thread. and it is a good practice to conserve these structure: First step is to write a class as you did. if you choose to put the … | |
Re: The default adress localmachine's ip is 127.0.0.1; or you can use "localhost" instead. | |
Re: Try to implement an actionPerformed in that class! Hopr it helps. | |
![]() | Re: some character are metacharacter in regex and has special meaning. If you want to match them you need to escape. in your cas it's the "*" caractere made this change please [CODE] temp = emailData.split("[B]\\[/B]*"); [/CODE] hope it helps. |
Re: Can you please give more information about the error! | |
Re: Please can you explaint what is he error? | |
Re: Hi check on this link; Hope it helps. | |
Re: Hi The part of code that gives the error is this: public void toRemove() { for(Point p : points) { if ( optimize(p) ) removePoint(p); } } public void removePoint(Point p) { points.remove(p); } Use an iterator and Iterator.remove() instead of for each loop. Hope it helps. | |
Re: Hi Can you te me please where you put your "Product.txt" file. | |
Re: Hi This topic have no thing to do with the convertion; the error is as mentionned by javaAddict's post and ou did notwant to use getSelectedSelection because it return a string value, and the data in you model is of type string. You maybe need to call getSelectedIndex that return … | |
Re: This loop loops infinitely. [CODE] do { numberIndex = mixture.nextInt(see.length); } while(!usedNums.add(numberIndex) ); [/CODE] Check the javaDoc for HashSet and look to the [B]add [/B]method. Hope it helps. | |
![]() | Re: Hi [CODE] //Here may be you main >= if (scores[i] [COLOR="Red"][B]<=[/B][/COLOR] 70) System.out.println("Pass" + i); if (scores[i] < 70) System.out.println("Fail" + i); [/CODE] and in youe code the array is not initilized. Hope it helps |
Re: Well there is two types of errors: At compile time the Client class has a surplus accolode at the end of the class At runtime the server class throw an index out of bound exception due to this statement: [CODE] int myImportedInt2 = (int) data[3]; [/CODE] Hope it helps. | |
Re: Hi try [CODE] System.exit(0); [/CODE] And check some documentation please! Hope it helps. | |
Re: Hi Made this change to avoid the ewception [CODE] for (i = 0; i < n; i++) { c[i] = new College(); c[i].read(); } [/CODE] hope it helps. | |
Re: The code abouve does not compile because the reader and description varialbes are not declared. [CODE] inputText.read(reader, description); [/CODE] the messageLabel is olso not initilized the NullPointerException is thrown at this statement: [CODE] messageLabel.setPreferredSize( new Dimension(LABEL_WIDTH, LABEL_HEIGHT)); [/CODE] and there is no code that read the data from file the … | |
Re: [QUOTE]alarmFailure() (cannot be overridden by any subclass)[/QUOTE] Make the alarmFailure function as final: [CODE] public final void alarmFailure(String a) { } [/CODE] hope it helps. | |
Re: the defineClass method of class loader could instanciate a calss either. hope it helps. | |
Re: Try to use KeyStroke.getKeyStroke Class with java.awt.event.KeyEvent.VK_F1. and registerKeyboardAction. that all what you need. Hope it helps | |
Re: Hi; Syntaxe error: [CODE] java.io.File fileout1 = new java.io File("validEmails.txt"); [/CODE] put instead: [CODE] java.io.File fileout1 = new java.io[B][COLOR="Red"].[/COLOR][/B]File("validEmails.txt"); [/CODE] You should not do that: [CODE] String[] email = new String[]; [/CODE] You have to define the size like: [CODE] String[] email = new String[12]; //for instance [/CODE] syntaxe error: … | |
Re: Can you please provide more information about your class? | |
Re: Hi; it seem that you'r using a deprecated version of the apach xmlrpc; the class XmlRpcClient in new version (published 15-Feb-2010) is located in the package org.apache.xmlrpc.client instead of org.apache.xmlrpc.XmlRpcClient. ANd there are some littel changes. Hope it helps | |
Re: Your code is almost correct; I'v made some little changes: import java.util.Random; import java.util.concurrent.Semaphore; import java.util.logging.Level; import java.util.logging.Logger; public class ThreadSync { private static ThreadSync thrdsync; private static Thread t1, t2, t3, t4, t5; private static final Random rand = new Random(); private static Semaphore sm = new Semaphore(2, true); … | |
Re: Hi There is may way to do that, this is about the linear representation of tree: Your code should look lik: [CODE] String path[] = { "nodeA1", "nodeA1/nodeB1/nodeC1", "nodeA1/nodeB1/nodeC1/nodeD1/nodeE1", "nodeA1/nodeB1/nodeC2", "nodeA1/nodeB2/nodeC2", "nodeA3/nodeB2/nodeC3" }; //The string at the i postion String s; //Array for holding the split result String[] ss; //List … | |
Re: Hi; lets begin with Profile class You have three constructors with the same signature [CODE] public Profile() {} public Profile() { birthDateMonth = 02; birthDateDay = 29; } Profile() { birthDateYear = 1999; birthDateMonth = 12; birthDateDay = 31; } [/CODE] this is not permitted you should first resolve this. | |
Re: the value of variable brush is null; it is not initialized. hope it helps | |
Re: At first glance it seem that this statement: [CODE] this.getClass().getResource("marioc.png"); [/CODE] returns null. | |
Re: Look at this: [CODE] if(dblInput > dblInput) [/CODE] May be you mean [CODE] if(dblInput > dblBalance) [/CODE] Hope it helps. | |
Re: Can you please provide more information about your calss. | |
Re: Hi Use upend instead of setText: [CODE] while (it.hasNext()) { LocaleList1.append((String) it.next()); // LocaleList1.insert((String) it.next()) ; } [/CODE] hope it helps | |
Re: The class Animal as posted below dies not provides any createOutputFile function. | |
Re: the data variable is not set in the Server class that is whay you receive this message from theclient [B]Message from server is >The Candidates List is null<[/B] try to give it some vlue int the Server class. Hope it helps |
The End.