ComponentMouseListener definitely works in an applet - otherwise, none of the 
demos would work.  :-)  If you run the ComponentExplorer demo, you will see 
these events getting fired:

http://pivot.apache.org/demos/component-explorer.html

You may need to click on the applet first - might that also be the problem in 
your case?


On Nov 24, 2010, at 7:25 AM, Kamil Toszek wrote:

> Hi,
> 
> I have this part of code:
> 
> stockTableView.getComponentMouseButtonListeners().add(new 
> ComponentMouseButtonListener()
>         {
>             public boolean mouseDown(Component component, Button button, int 
> x, int y)
>             {
>                 applicationStateManager.setStatusMessage("test - mouse Down");
>                 return true;
>             }
> 
>             public boolean mouseUp(Component component, Button button, int x, 
> int y)
>             {
>                 return true;
>             }
> 
>             public boolean mouseClick(Component component, Button button, int 
> x, int y, int count)
>             {
>                 applicationStateManager.setStatusMessage("test - mouse 
> Click");
>                 if (count > 1)
>                 {
>                     int rowAt = stockTableView.getRowAt(y);
>                     if (rowAt != -1)
>                     {
>                         HashMap<String, Object> row = tableRows.get(rowAt);
>                         selectedSymbol = (String) row.get("symbol");
>                         
> ApplicationContext.sendMessage(StockState.SwitchSubState.CHART);
>                     }
>                 }
>                 return true;
>             }
>         });
> 
> 
> Function   "applicationStateManager.setStatusMessage" sets text of status 
> label - I'm using it here for debuging purposes.
> 
> Problem is that this ComponentMouseButtonListener (added to TableView), works 
> perfectly on desktop (if I run application buy double clicking jar (on 
> Windows)). But it looks like those events are not fired when app is running 
> inside browser as an applet.
> 
> Please help.

Reply via email to