Re: Mac OS X: Problems with custom widget in JTable



"John B. Matthews" <nospam@xxxxxxxxxxxxxx> writes:

In article <87bpij3hym.fsf@xxxxxxxxxxxxxxxx>,
Felix Natter <felix.natter@xxxxxxxxxxxxxxxxxxx> wrote:

I am using a simple "graph widget" (a subclass of JComponent that
overrides the paint() method) as a cell renderer in a simple JTable.

This works fine on Linux and Windows (you see the /\ /\ in each
cell), but on Mac OS X (also with Java 1.6) the cells are empty (just
plain white window).

A minimal example that shows this behavior is attached. Do you have
any ideas?
[...]
public void paint(Graphics g) {

Override paintComponent():

<http://java.sun.com/products/jfc/tsc/articles/painting/index.html>

And I just confirmed that that will work on MacOS X, with Java 1.6
(Tested with OS 10.5, Intel HW)


--
Thomas A. Russ, USC/Information Sciences Institute
















.



Relevant Pages

  • Whats the proper time for view initialization?
    ... This is really a two question post: ... I see overrides like hookWindowCreate, but I really am not sure what ... I need to resize the window before it is shown as well ...
    (comp.lang.smalltalk.dolphin)
  • Re: Mac OS X: Problems with custom widget in JTable
    ... overrides the paintmethod) as a cell renderer in a simple JTable. ... plain white window). ...
    (comp.lang.java.gui)
  • Re: Overrides-Messages concept in MFC
    ... //Calls base class functionality if needed ... In order for a class to be a "Window", it must inherit from CWnd and be registered. ... There are methods in MFC which are in overrides section or Message Section. ... OnDraw is in overrides section. ...
    (microsoft.public.vc.mfc)
  • Re: Distorted dialog title bar after SetWindowPos in OnInitDialog
    ... draws the text, and worse still, it doesn't do the job right. ... invalidating the window, it actually draws the text directly on the ... doing the sane thing of invalidating and waiting for WM_PAINT. ... overrides WM_SETTEXT and calls InvalidateWindowto cause OnPaintto be ...
    (microsoft.public.vc.mfc)
  • vs2005: how to make overrides shown?
    ... I build a base class with some functions that can be overriden.When I click ... my class in CLASS VIEW window, then click OVERRIDES tab on the PROPERTIES ...
    (microsoft.public.vc.language)