108 Posted Topics
Re: Actually your question has nothing specific to RadioButton it will be the same for any component. As peter_budo mentionned, you have probably a lot of different layouts in that application. Which one gives you the problem ? Which RadioButton is not a the good place ? Post the code for … | |
Re: These 2 lines do not make sense [code] double a = keyboard.nextDouble(); a = getBalance(); [/code] Input a user value from the console and storing it into variable a Erasing the just read value from the user calling getBalance() getBalance() in any case should be called from a Check object … | |
Re: An easy way ? No. This is quite an advanced topic. | |
Re: ouf really complicated for nothing assuming you want values <= finalSize [code] int[] newArray = new int[finalSize]; Random ran = new Random(); for(int i = 0; i < newArray.length(); ++i) newArray[i] = ran.nextInt(finalSize) + 1; [/code] | |
Re: and what does your isPrime(int) method looks like ? and i++ is a waste of time is useless :) i += 2 will do it no need to test all even numbers | |
Re: By the way, to respect universal practive by C/C++/Java/Fortran programmers for ( int i = 0; i == s3.length() -1; i++) should be for ( int i = 0; i < s3.length(); i++) | |
Re: Post the code you have already written | |
Re: Java does not have/needs preprocessor directives as C/C++ has no macro, no #define so no preprocessor that's it | |
Re: Has nothing to do with the fact that your buttons are in a ButtonGroup or not [code] private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { Object o = evt.getSource(); if(o == button1) { ... } else if(o == button2) { ... [/code] | |
Re: What Protege tool are you talking about ? Google protege tool returned to me a lot of links most of them in the biomedical field and one in Software Engineering but that one is a kind of JFrame designer without any API to get/set property | |
Re: Your question does not really make sense [i]I have a file that produces a random number in a folder called number.[/i] How can a file produces random number ? A file is data storage on a media. It does not generate anything. A program does. [i]I have a file that … | |
Re: A Client class whith as instance variables: - String account - double balance - double[] transaction or ArrayList<Double> transaction - double creditLimit should do plus obviously a public void main(String[] args) method to test the whole thing | |
Re: is 524 n int or a Strng ? If it is a String [code] String str = "524"; for(int i = 0; i < str.length(); ++i) System.out.printl(str.charAt(i)); [/code] | |
Re: could you post some of the "ideas" you have tried and tell us what was wrong with them ? | |
Re: hibernate inheritance hierarchy ????? | |
Re: You can extend a class from a package but you can't extend the package itself and you will have to show your directory structure and how you do your import statements | |
Re: Actually not 100% true. Static variables can be used if declared [i]final]/i] which is good for the serialVersionUID. I guess it is just because it would be to difficult (or time consuming at run time) to implement because the Java Virtual Machine has restrictions on calling private members from outside … | |
Re: Don't see why you don't use the JList for data processing. After all a JList is just an ArrayList with GUI features | |
Re: You will eventually have to read them. You can make a checksum on the files content. If the checksums are different they are obviously not equals. If the cheksums are the same then no choice than comparing them line per line. | |
Re: Probably a .jar that is defined in your NetBeans IDE external .jar but whose directory is not in your PATH environment variable | |
Re: And what is your problem ? One thing for sure [code] for(i=0;i<5;i++) { if(e.getSource()==ADD) [/code] no need to check 5 times that ADD is the JComponent that generated the Event | |
Re: Did you download MySQL.jar file ? If so is this .jar in your PATH variable or in the External Jar folder of your IDE if you use an IDE ? | |
Re: Depends in which context you are If you are generatiing a .exe or a .jar should be the name of the file where these will be written If you are generating JavaDoc the .html file ... there are about 6 of these | |
Re: Design your own GUI by hand. Netbeans generate hardly understandable code by human being. What will you do at a job interview if they ask you to design a very very simple GUI using only Notepad ? Stay away from GUI generators. | |
Re: come on it is not that complicated to make it recursive in a single loop [code] static long getDirSize(File dir) { if (dir.isFile()) return dir.length(); File[] subFiles = dir.listFiles(); long size = 0; for (File file : subFiles) { if (file.isFile()) size += file.length(); else size += getDirSize(file); } return … | |
Re: You can just overload a method You will have first to extends the class then you can overload the method [code] class MyClass extends theClassThatContainsOpenRead { // now you can overload public boolean openRead() throws.... { // your code here // if filename and sc are private you will have … | |
Re: Don't now of ones already make but with a JEditorPane and an HyperlinkListener shouldn't be complicated to write one [code] public class WebBrowser extends JPanel implements ActionListener, HyperlinkListener { private JTextField url; private JButton button; private JEditorPane editorPane; public WebBrowser() { super(new BorderLayout()); url = new JTextField(30); url.setText("http://"); button = … | |
Re: Please use code tags and indent your code correctly it is a nightmare to read And why check for isLetter ? just if charAt(i) == charAt(j) should do | |
Re: Please post your code using the code tags We lost the "pedagogic" approach of this site if viewers have to dowload your code | |
Re: Google OpenCV gave me more than 3 millions posts. What else do you need ? | |
Re: Not really an easy task You can scan the directory structure until you find what you want but this solution is not really elegant. | |
Re: "I recommend using an IDE which compiles as you write, you can find errors much quicker" This is not the good way to really learn (my opinion) | |
Re: Syntax is: java -jar jarfile.jar arguments so assuming the .jar file is Maintenance.jar the command should be java -jar Maintenance.jar optional parameter java -jar Maintenance.jar Attendance | |
Re: Spent 2 years at Microcell programming this on cellular phone. I'll be glad to help you with any problem you will encounter. | |
Re: You obviously have a recursive call Most probably a constructor calling back itself but without seing your code not easy to diagnose the problem | |
Re: Probably because you want all users on the computer to have JRE accessible and select the users with JDK access Don't see any other reason | |
Re: Windows In the Hotspot implementation, the way that Thread.yield() works has changed between Java 5 and Java 6. In Java 5, Thread.yield() calls the Windows API call Sleep(0). This has the special effect of clearing the current thread's quantum and putting it to the end of the queue for its … | |
Re: Each instruction are 1 byte in lenght but might be followed by bytes of data iload 1 goto 38 does not produce in all format but the one of your JRE [url]http://en.wikipedia.org/wiki/Java_bytecode[/url] | |
Re: Are you talking really basic ? GUI applications ? JDBC connectivity ? | |
Re: If you followed these instructions [url]http://download.oracle.com/javase/tutorial/deployment/jar/basicsindex.html[/url] it should work | |
Re: You might think that you are pressing multiple keys at the same time but a few milliseconds between each of themm will make a difference Anyhow, even if you manage to click 2 keys at exactly the same time, the hardware will sent 2 distinct interrupts and queue (randomly) the … | |
Re: I am making my PhD thesis at MIT Can you please send me a thesis ? | |
Re: RAM is allocated in the heap as required The important point is that as Java does not allow arithmetic operations on pointers and validates array bounds you cannot access data outside the JVM. So you cannot pick and poke around. | |
Re: Keep GroupLayout for GUI builder but if you still want to use them the JLabel should not be added to the JPanel (using the JPanel add method) as you do but to the horizontalGroup and verticalGroup you created [url]http://download.oracle.com/javase/6/docs/api/javax/swing/GroupLayout.html[/url] | |
Re: This is the Java forum not the javascript forum Even if the names are similar, they are not related at all | |
Re: The % returns the modulo (reminder) of first number divided by second number so 5 % 2 is 1 and 6 % 3 is 0 so if(num1 % num2 == 0) it means that num1 is an excat multiple od num2 | |
Re: Window -- Preference ---- General ------- Appearance --------- Colors and Fonts ----------- Basic |
The End.