Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3845 > unrolled thread

Re: Is there a limit to t

Started byPaul.Lee.1971@gmail.com.remove-dii-this
First post2011-04-27 15:47 +0000
Last post2011-04-27 15:47 +0000
Articles 6 — 4 participants

Back to article view | Back to comp.lang.java.gui

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Is there a limit to t Paul.Lee.1971@gmail.com.remove-dii-this - 2011-04-27 15:47 +0000
    Re: Is there a limit to t "Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
      Re: Is there a limit to t Paul.Lee.1971@gmail.com.remove-dii-this - 2011-04-27 15:47 +0000
        Re: Is there a limit to t "Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
          Re: Is there a limit to t "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
        Re: Is there a limit to t "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000

#3845 — Re: Is there a limit to t

FromPaul.Lee.1971@gmail.com.remove-dii-this
Date2011-04-27 15:47 +0000
SubjectRe: Is there a limit to t
Message-ID<e97d7158-989e-414c-b01f-36718dba7ba2@26g2000hsk.googlegroups.com>
  To: comp.lang.java.gui
Heres a hint:

if the post I gave starts with "import ...." or "public class ...."
then that means its a new class, and should appear in a new *.java
file. When I posted the code I put sufficient gaps between the
different classes to make it clear where one ended and one began. It
looks like google groups has parsed them all out.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#3846

From"Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this>
Date2011-04-27 15:47 +0000
Message-ID<g6o5vp$v9i$1@registered.motzarella.org>
In reply to#3845
  To: comp.lang.java.gui
On 29/07/2008 23:29, Paul.Lee.1971@gmail.com allegedly wrote:
> Heres a hint:
> 
> if the post I gave starts with "import ...." or "public class ...."
> then that means its a new class, and should appear in a new *.java
> file. When I posted the code I put sufficient gaps between the
> different classes to make it clear where one ended and one began. It
> looks like google groups has parsed them all out.
> 

Paul, you really need to trim that down. I ain't gonna wade through all
that. Knute most probably won't, either. You need to reduce the
complexity, distillate your problem out.

If you were at least able to formulate your problem concisely. You
aren't. In your original post, you wrote: "when I add another algorithm
to paintComponent" ... wtf. You started to describe what that algorithm
did, but you left the whole point of what its *impact* on the process
may be to others.

So: analyse, analyse, analyse. Or help others analysing. By reducing
complexity. Even if it doesn't get anybody to help you, it will help you
helping yourself.

-- 
DF.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3847

FromPaul.Lee.1971@gmail.com.remove-dii-this
Date2011-04-27 15:47 +0000
Message-ID<936b3b15-a5fe-4195-8ce6-43ad63070b67@z72g2000hsb.googlegroups.com>
In reply to#3846
  To: comp.lang.java.gui
On 29 Jul, 23:35, Daniele Futtorovic <da.futt.n...@laposte.invalid>
wrote:
> On 29/07/2008 23:29, Paul.Lee.1...@gmail.com allegedly wrote:
>
> > Heres a hint:
>
> > if the post I gave starts with "import ...." or "public class ...."
> > then that means its a new class, and should appear in a new *.java
> > file. When I posted the code I put sufficient gaps between the
> > different classes to make it clear where one ended and one began. It
> > looks like google groups has parsed them all out.
>
> Paul, you really need to trim that down. I ain't gonna wade through all
> that. Knute most probably won't, either. You need to reduce the
> complexity, distillate your problem out.

What I posted above was the basic bare-bones of the programme. If I
reduce it
any more, it will show what I want, but won't have the functionality I
need.
If I add to it, it will have neither. How can I trim it down?

>
> If you were at least able to formulate your problem concisely. You
> aren't. In your original post, you wrote: "when I add another algorithm
> to paintComponent" ... wtf. You started to describe what that algorithm
> did, but you left the whole point of what its *impact* on the process
> may be to others.

But I've already described (in the code in the delimetered //
section) what the code
does - it sifts through a linked list and decides on colours and
shapes depending on
the type of data found in the list. I don't know what its impact is on
the process,
thats why I asked! If I add that section of code, not all swing
component get drawn
(and not just the one derived from JPanel, which has the overridden
paintComponent
method above, but many others).

>
> So: analyse, analyse, analyse. Or help others analysing. By reducing
> complexity. Even if it doesn't get anybody to help you, it will help you
> helping yourself.
>

Thanks.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3848

From"Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this>
Date2011-04-27 15:47 +0000
Message-ID<g6oa1i$u6c$1@registered.motzarella.org>
In reply to#3847
  To: comp.lang.java.gui
On 30/07/2008 00:45, Paul.Lee.1971@gmail.com allegedly wrote:
> On 29 Jul, 23:35, Daniele Futtorovic <da.futt.n...@laposte.invalid>
> wrote:
>> On 29/07/2008 23:29, Paul.Lee.1...@gmail.com allegedly wrote:
>>
>>> Heres a hint:
>>> if the post I gave starts with "import ...." or "public class ...."
>>> then that means its a new class, and should appear in a new *.java
>>> file. When I posted the code I put sufficient gaps between the
>>> different classes to make it clear where one ended and one began. It
>>> looks like google groups has parsed them all out.
>> Paul, you really need to trim that down. I ain't gonna wade through all
>> that. Knute most probably won't, either. You need to reduce the
>> complexity, distillate your problem out.
> 
> What I posted above was the basic bare-bones of the programme. If I
> reduce it
> any more, it will show what I want, but won't have the functionality I
> need.
> If I add to it, it will have neither. How can I trim it down?

By successively eliminating bits that don't affect the problem.


>> If you were at least able to formulate your problem concisely. You
>> aren't. In your original post, you wrote: "when I add another algorithm
>> to paintComponent" ... wtf. You started to describe what that algorithm
>> did, but you left the whole point of what its *impact* on the process
>> may be to others.
> 
> But I've already described (in the code in the delimetered //
> section) what the code
> does - it sifts through a linked list and decides on colours and
> shapes depending on
> the type of data found in the list. 

Sorry if that offends you, but I don't believe you. I don't believe that
commenting out the block in question *as you posted it* introduces a
problem. You are welcome to prove me wrong. To do that, post some code I
can compile and run (not an Applet, a JFrame) -- as Knute suggested. If
you have more than one class, refactor them as static inner classes, or
as classes in the same file -- never mind -- but post something I can
copy and paste and compile successfully.


> I don't know what its impact is on
> the process,
> thats why I asked! If I add that section of code, not all swing
> component get drawn
> (and not just the one derived from JPanel, which has the overridden
> paintComponent
> method above, but many others).

Two things which got my attention.

1) PLEASE USE CAMEL-CASE. It's a pain to read the way you wrote it.

"resetscreencoords" -> "resetScreenCoords"
"determinescreencoordinates" -> "determineScreenCoordinates"

and so forth.

2) Boolean eastwestveto = false;

Mind the difference between Boolean (an Object) and boolean (a primitive
type). In the line above, some Java voodoo (sadly introduced since 1.5)
called "autoboxing" is performed, transforming the primitive boolean
"false" into the Boolean Object Boolean.FALSE.

Use primitive booleans for such cases.

-- 
DF.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3851

From"Lew" <lew@THRWHITE.remove-dii-this>
Date2011-04-27 15:47 +0000
Message-ID<DJGdnWRCPrcHJxLVnZ2dnUVZ_r6dnZ2d@comcast.com>
In reply to#3848
  To: comp.lang.java.gui
Daniele Futtorovic wrote:
> Mind the difference between Boolean (an Object) and boolean (a primitive
> type). In the line above, some Java voodoo (sadly introduced since 1.5)

That would be "happily introduced in 1.5."

> called "autoboxing" is performed, transforming the primitive boolean
> "false" into the Boolean Object Boolean.FALSE.
> 
> Use primitive booleans for such cases.

But autoboxing is only convenient when you are responsible for it, otherwise 
it is "sadly introduced".  Daniele's advice is good.

-- 
Lew

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3855

From"RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this>
Date2011-04-27 15:47 +0000
Message-ID<48903933$0$26079$db0fefd9@news.zen.co.uk>
In reply to#3847
  To: comp.lang.java.gui
Paul.Lee.1971@gmail.com wrote:
> Daniele Futtorovic wrote:
>> Paul, you really need to trim that down. I ain't gonna wade through
>> all that. Knute most probably won't, either. You need to reduce the
>> complexity, distillate your problem out.
> 
> What I posted above was the basic bare-bones of the programme. If I 
> reduce it any more, it will show what I want, but won't have the
> functionality I need. If I add to it, it will have neither. How can I
> trim it down?

http://sscce.org/ has a section entitled "Tricks for Trimming". Perhaps
that will help?

-- 
RGB

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web