This code would be very useful. I have searched the
mailing list and Google for JMolSimpleBean but to no
avail. Is this all that is necessay and sufficient to
embed JMol into a JPanel.
Thanks,
S.
Original Message:
From: Jacob Martin <[EMAIL PROTECTED]>
JMol in a JPanel code
2003-06-10 01:58
Guys,
Here is some code I use to get jmol into a JPanel.
Don't know if it still
works with the new version! I also have an example
of how to use an applet
in an application if you'd like me to send it.
However, this way is much easier, and much more
efficient!
Take care,
Jacob Martin
University of Georgia
=================================================================
public void setGUI() {
moleculeViewer = new JmolSimpleBean();
moleculeViewer.setPickingMode("NOPICK");
if (urlAtomTypes == null) {
try {
urlAtomTypes = new
java.net.URL(strAtomTypesURL);
moleculeViewer.setAtomPropertiesFromURL(urlAtomTypes);
}
catch (java.net.MalformedURLException e)
{
throw new RuntimeException(("Got
MalformedURL for Atomtypes: "
+ e.toString()));
}
}
setLayout(new java.awt.BorderLayout());
add(moleculeViewer, BorderLayout.CENTER);
}
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers