Re: JFrame with an Object which inherits JComponent, first object doesn't work, others do




<gooderthanyou@xxxxxxxxx> wrote in message news:1144781418.706766.265760@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Second, all Java 2 SE game code I have seen paints everything
by itself on some top-level window, instead of relying on components and
the repainting mechanism.

I don't really understand what you mean.. you mean each compoenent
paints itself with own graphics object? I am painting with the
JFrame's graphic's object, but they are painting themselves...

No, he means get rid of the Components (with a capital C) entirely. You can have things which, conceptually, are components (with a lowercase C) to *you*, but don't bother with the java.awt.Component class. Instead, just have one big flat drawing surface, and draw whatever you need to draw on that surface.

- Oliver

.



Relevant Pages

  • Re: Drawing a string
    ... why don't you ditch the picturebox and do all the painting in the ... OnPaint method of your form, get the graphics object you are passed, draw ... > like the picture box is in front of the string I've drawn. ...
    (microsoft.public.dotnet.framework.compactframework)
  • text in gdi+
    ... I have a position BasePoson a graphics object that I would like to ... that it is draw at to be rotated/scaled. ... required transformations to, then draw my text to that. ... you can then rotate/scale these groups. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Whats the swing equivalent for Canvas?
    ... ensure all materials at my site/s are ... For that reason, ... declare a Graphics object as a class attribute. ... it will only draw the complex bit once. ...
    (comp.lang.java.gui)
  • Re: Inverting or flipping a GraphicsPath
    ... You can apply any transform to a path or draw a path to any transformed ... Graphics object. ... To flip the graphics path you would need to invert one or other of the axes ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: DrawImage with High DPI Still Pixelated?
    ... what is the original DPI of the image you are recieving? ... Their text that they draw into the Bitmap ... Please note that its not blury when I ... >>> text with the DrawString method into the received graphics object, ...
    (microsoft.public.dotnet.framework.drawing)