Posts
 
Reputation
Joined
Last Seen
Ranked #492
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
94% Quality Score
Upvotes Received
17
Posts with Upvotes
17
Upvoting Members
13
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
7 Commented Posts
0 Endorsements
Ranked #654
~66.5K People Reached
About Me

Have nothing to say.

Interests
Playing Music, Movie freak...
PC Specs
Macbook pro
Favorite Tags
Member Avatar for SasseMan

Hi! I'm sitting with a gui bug that I have been stuck with for a while. When a "view" is changed from one "view" to another, the new "view" doesn't get painted properly. The previous view is visibile randomly in the background. I can't reproduce this in the dev environment …

Member Avatar for Ali_55
0
1K
Member Avatar for SasseMan

Hi! I'm having an issue with maven I can't figure out. I have two local projects, project1 and project2. Project1 has project2 as a dependecy as you would have any dependecy in maven declared. Everytime I make a change in project2 I have to install it into the local repository …

Member Avatar for peter_budo
0
146
Member Avatar for lj81

First step to unit testing is to make your code testable. I'll give you one example. In your mouseReleased method you have a lot of code that does some calculations and set some variables. What you could do here to make the code more testable is to move out the …

Member Avatar for SasseMan
0
277
Member Avatar for fularipk

This is a super non-trivial problem. Not just a matter of providing an algorithm. But I'm guessing your looking for a library providing eye tracking implementations. A quick google of "eye tracking java" gave me this: http://lmgtfy.com/?q=eye+tracking+java which lead me to this: http://code.google.com/p/experteyes/ which might be interesting.

Member Avatar for SasseMan
0
165
Member Avatar for vergil1983

Hi! First off, use of JApplet is prefferable over Applet since it supports Swing component architecture. So let your BallWorld class extend JApplet instead, it is essentially the same thing. Then you should maybe override the init() method in your BallWorld class to set up you applet. You should instansiate …

Member Avatar for SasseMan
0
575
Member Avatar for Onlineshade

Can you be more specific? How do you setup your JTable? I'm pretty sure there is no limitation to how many rows a JTable can display.

Member Avatar for Onlineshade
0
184
Member Avatar for mehnihma

something like this should work... File rootDir = new File("/Path/to/dir/"); File[] filesAndDirectories = rootDir.listFiles(); the filesAndDirectories array contains everything in rootDir. You can search for filename given a regexp or something, go down to another directory etc...

Member Avatar for mehnihma
0
155
Member Avatar for SasseMan

Hi! I'm working with a huge software system with a lot of people being involved in the coding through many years. I'm noticing more and more that there is a lot of bad code, especially get methods here and there with huge side effects, which you totally not expect. So …

Member Avatar for SasseMan
0
244
Member Avatar for jouj

read: http://docs.oracle.com/javase/tutorial/uiswing/components/list.html under "Writing a Custom Cell Renderer"

Member Avatar for SasseMan
0
114
Member Avatar for nickliutw

First of, do you have to implement your own list? There a many list implementations in java. Recursive printing could look something like this. [code] public void print(SinglyLinkedList<E> list) { if ( list.size() == 0 ) return; // print first element in list // call print with a new list …

Member Avatar for nickliutw
0
206
Member Avatar for SasseMan

Hi! I think the title is quite clear, but is there a way (I'm using Xcode 4) to auto generate the methods defined in a c++ header file to a cpp file? I just want empty methods that are compatible with the definitions in the header. Can't find anything on …

0
82
Member Avatar for SasseMan

Hi! I was wondering if there is a way to mock Date and Calendar objects for testing purposes. In other words I want to programatically be able to change what new Date() and new Calendar() etc. returns independent of the system date. Something like setting the date for the jvm …

Member Avatar for SasseMan
0
214
Member Avatar for shean1488

I work at a software company that makes retail enterprise systems. I started hereright out of the university and have been working for about a year. The first couple of moths they gave me some time to familiarize myself with the systems and the code. I started of with minimal …

Member Avatar for shean1488
0
206
Member Avatar for SasseMan

I'm searching for a java library/framework that makes printing easier. By easier I mean something that makes it possible to layout and format text/images and other elements in a document by defining layouts in html/xml or something. I also want the layout to be decoupled from rendering so the document …

0
95
Member Avatar for Tuz

What do you mean by ArrayList of three classes? You could create an ArrayList which hold Objects. Or maybe an interface class that the three classes have incommon. [code] public interface GeneralType { public void someMethod(); } // Use Object as the generic type and cast to something else later. …

Member Avatar for stultuske
0
255
Member Avatar for Sanna.1

Your problem description is a little unclear, but, first I'm noticing that the program only will terminate if "N" is typed, everything else is going to result in another game loop. Secondly, the number you're guessing is going to be the same for every replay since a new number is …

Member Avatar for SasseMan
0
108
Member Avatar for cs_1000100

Well there is a java matlab interface: [url]http://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html[/url] I haven't tried it myself but it looks promising. What is that you want to do with matlab that needs more user interface than matlab provides? Matlab has alot of plotting and presentation tools. You will still need to have a matlab …

Member Avatar for cs_1000100
0
257
Member Avatar for miramiey

The first thing I'm noticing is that all your code is en the paint method. This method should only be overriden if you want to do custom painting like the painting you are doing in the beginning of the method. You should not add swing components to layouts etc. in …

Member Avatar for JamesCherrill
0
212
Member Avatar for adil_bashir

Something like this... [code] String input = "123"; int parsedInput = 0; try { parsedInput = Integer.parseInt(input); } catch(NumberFormatException nfe) { // Handle incorrect input } [/code]

Member Avatar for adil_bashir
0
180
Member Avatar for SasseMan

Hi! I have a JScrollPane that contains a JPanel with a CardLayout, which in turn contains two JPanels with some labels and stuff. I want the contents of the ScrollPane/ViewPort to never exceed the width of the viewport. The problem I'm having is that when a label holds a lot …

Member Avatar for mKorbel
1
178
Member Avatar for Mr.BunyRabit

Can it be a plugin that you don't have in the new version of netbeans? Check what plugins that are active in the old version etc...

Member Avatar for SasseMan
0
62
Member Avatar for SasseMan

Hi! I'm having some problems with my build files while running junit tests via ant. The build worked fine until a couple of days ago when I got a "process fork failed" error message. Further down in the stack trace i got: Caused by: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.6.0_25\jre\bin\java.exe" …

Member Avatar for DavidKroukamp
0
367
Member Avatar for Nerd12

Sounds advanced. Do you want to implements some kind of robot with AI that walks your dog?

Member Avatar for SasseMan
-1
61
Member Avatar for mneha67
Member Avatar for CodeJava1

Well, the basics are quite simple. In junit 4 you annotate your test methods like the following. Your class doesn't have to extend anything. [code] public class SimpleTest { @Test public void aTestCase() { //Some test code... } } [/code] In Junit 3 you method name has to end with …

Member Avatar for krishnisilva
0
335
Member Avatar for SasseMan

Hi! I'm looking for a way to only run a few tests instead of all existings JUnit test cases in our automated build, which uses ant. I can't add @ignore annotations in the code since it would take to much time. Is there a way to define which test cases/classes …

Member Avatar for SasseMan
0
218
Member Avatar for Majestics

If your goal is to represent a number with n significant decimals, you should use BigDecimal instead of Double. If it's simply a formating issue, have a look at NumberFormat and its subclasses (DecimalFormat).

Member Avatar for mKorbel
0
227
Member Avatar for jackbauer24

You compile in the order of depenedency, I'm not sure if javac handles that in some way, try it or google. If ClassA depends on ClassB, compile ClassA first and then ClassB. To run you need your main class, i.e. the class where you have the method "public static void …

Member Avatar for jackbauer24
0
95
Member Avatar for ThaiAmL

I don't know what you mean here when you say constructor but I see no constructors in your code. A constructor resides in a class with the same name as the class. The default constructor is a constructor with no input parameters. In my opinion you should write a matrix …

Member Avatar for DavidKroukamp
0
842
Member Avatar for 03hasnam

You need a way to read filenames in a directory or subdirectory. Easy to goole: [url]http://www.exampledepot.com/egs/java.io/GetFiles.html[/url] And then you just read the files one by one and extract the line you want by using, for instance, FileInputStream, BufferedReader etc... [url]http://docs.oracle.com/javase/6/docs/api/[/url] Read the javadocs and examples. [url]http://www.roseindia.net/java/beginners/java-read-file-line-by-line.shtml[/url]

Member Avatar for NormR1
0
370