NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi All, 1. I have created a 2D grid using UnionSet. I also worked on changing the colors of the gridded sets. We want the boundary gridded sets to be of different colors. Is there any way to change the colors of particular gridded sets? Please suggest in this. 2. I am using Direct Manipuilation renderer for drawing the geometry and then drawing the grid. Everything works fine. I want to stop the direct manipulation renderer after the grid is drawn. How can i stop this? Please help me out in this matter. 3. I want to add JPopUp menu on JPanel where grid is coming. I am trying to add it but, it is giving some problem. How can i achive this. public void popAdd(){ display.addDisplayListener(new DisplayListener() { public void displayChanged(DisplayEvent e) { if(e.getId() = DisplayEvent.MOUSE_RELEASED_RIGHT ) { addPopupMenu(); } } } ); } public void addPopupMenu() { popupMenu = new JPopupMenu(); item = new JMenuItem("Show Grid"); popupMenu.add(item); popupMenu.show(); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent avt) { // checkPopup(avt); } }); } public void checkPopup(MouseEvent mv) { if(mv.isPopupTrigger()) { popupMenu.show(this, mv.getX(), mv.getY()); System.out.println("x = " + mv.getX() + " y = " + mv.getY()); } } with regards. Karan Kapoor __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com
visad
archives: