04-07-2006 13:39:21
How can I remove the menubar and the toolbar of MarvinSketch?
04-07-2006 13:39:21
ChemAxon 7c2d26e5cf
04-07-2006 13:57:36
Code: |
msketch_begin("marvin", 430, 300); msketch_param("viewonly", "true"); // to hide toolbar msketch_param("menubar", "false"); // to hide menu bar msketch_end(); |
Code: |
MSketchPane sketchPane = new MSketchPane(); sketchPane.setParams("viewonly=true\n"); // to hide toolbar sketchPane.setJMenuBar(null); // to remove the Marvin menu bar |
Code: |
sketchPane.setPopupMenusEnabled(false) |
04-07-2006 14:21:55
ChemAxon 7c2d26e5cf
04-07-2006 14:50:48
Code: |
JPanel editpanel = null; // search editpanel (first JPanel on the content pane) Component[] comps = sketchPane.getContentPane().getComponents(); for(int i = 0; i < comps.length; i++) { if(comps[i] instanceof JPanel) { editpanel = (JPanel)comps[i]; break; } } // search scrollbars on the editpanel if(editpanel != null) { comps = editpanel.getComponents(); for(int j = 0; j < comps.length; j++) { if(comps[j] instanceof JScrollBar) { editpanel.remove(comps[j]); // remove scrollbars } } } |