01:12 am - banana - Swing weirdness I've been having trouble with the first pixel-looking or illegible. I thought I'd done something stupid. So I built a small example to isolate the problem.Then by accident I found the cause: creating the objects on the right thread. Can you guess which thread is "right"? Here's the code and some sample output.**( Read more...Collapse )**Any ideas why this happens? I have a work-round (add one to the JTextField's preferred width), but I'd like an explanation.
07:00 pm - soul_cake_duck Hi. Another quick question:I have an array of randomly generated numbers, which I need to sort through to see whether the same number occurs twice or more. How can I do this? I know I can sort the array into ascending order, but I just cant get my head around how to then tell it to check if the same number occurs twice. Thanks!