Imitating the add() function without actually adding a Applet object

Okay, I have an instance of an object that ultimately extends Applet (not JApplet). I want this applet to paint itself onto another instance of JFrame without adding (performing the add(component) method) the applet instance.
Note though that if I do add the applet to the JFrame, the object is painted correctly and everything works fine. But for some reasons specific to me (that I don't want to go into details with), I do not want to add the applet.
I would want to do something like this:
Applet instance = /* my instance */
JFrame frame = /* my frame */
JPanel pane = new JPanel(new BorderLayout()) {
  public void paint(Graphics g) { instance.paint(g) }
  public void update(Graphics g) { instance.update(g) }
frame.add(pane);Using the above concept, the frame doesn't get any painting. Exactly what does the add method do that I'm not imitating here? I've tried looking through the source and I don't see much changing of the actual instance. I also tried setting the parent of the applet (using reflect) to my JPanel (above example), but that did nothing. I tried doing that since I thought the applet may have uses the getGraphics() method for getting a graphics to draw with. BTW, I do not have source code to the Applet instance: I'm trying to make this dynamic.
Thanks in advance for any support
Message was edited by:
khaoz
null

There are 2 problems I can think of:
1. Calling paint on heavyweight components does no drawing to the graphics object. You can see this if you try to use the java print API to print a heavyweight button or something
2. I'm not sure that calling paint on Applet causes the applets children to get drawn.
Your best bet might be to use the java.awt.Robot, do a screen scrape of your applet and then draw that in your frame.

Similar Messages

  • How can I set a polygon's path by using the .add() function?

    I have been searching the web and this forum and doing plenty of experimenting, and I can't for the life of me figure out how to do this.
    I can set other attributes of a polygon inside the add() parentheses, such as the fillColor, but I can't set the polygon's path's pathPoints unless I use a separate line of code after the add(); line.
    My script adds a great deal of polygons in a row, so halving the number of operations would greatly help me, and also it seems that some properties such as appliedObjectStyle cannot be set until after a polygon's path is defined. That means I need a third line of code after add() and entirePath=, which slows me down even more.
    Help?

    Ryan, I think you need to reset and take a moment to understand what it is that is going on here.
    The things you've proposed that don't work shouldn't work, and it's all quite simple.
    Generally speaking, a .add() function takes an additional parameter, a JavaScript Object, that list properties of the created object that can be set.
    A JavaScript Object is a list of key/value pairs, just like an associative array in a language like perl, or a dictionary in a language like Python. It is expressed in curly braces as such:
    { key1: value1, key2: value2, key3: value3}
    So, for any such general add function, these
    foo = whatever.add();
    foo.bar = baz;
    are equivalent to this:
    foo = whatever.add({bar: baz});
    Are you with me? So, for instance, you had originally asked why you could not use pathPoints in polygons.add() and the answer is simpe. You cannot set polygon.pathPoints, because there is no .pathPoints property of a polygon.
    So, when you want to try add properties inside properties, you must do as as objects within objects, and follow the strict hierarchy. Marc advises that this works:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings: {dropShadowSettings: {angle:120}}
    and if indeed that is so, then the extension for setting multiple transparencySettings should be clear. It is not this, that you propose:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings: {dropShadowSettings: {angle:120}}
        transparencySettings: {dropShadowSettings: {distance:1}}
    Because to do so is to set the transparencySettings key twice in the same Object. And to do that is to replace the first with the second. The above (yours) is wholly equavelent to:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings: {dropShadowSettings: {distance:1}}
    If you wish to set more than one attribute of dropShadowSettings, you must set transparencySettings to an object containing one and only one dropShadowSettings, and you must do it only once. So it is this:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings:
          {dropShadowSettings: {angle:120, distance: 1}}
    I am not sure why you thought you should have the name of the key in the Object named properties. That is probably because in some cases you can use:
    foo.properties = { a: 1, b: 2};
    as a shorthand for
    foo.a=1;
    foo.b=2;
    but you would [probably] never want to mix that with the object notation for setting multiple properties in the .add() function.
    Does this help to clarify?
    As for your last question:
    Also, it doesn't let me use square brackets or parentheses inside the add() parentheses, so the original problem I posted (trying to set a polygon's path) is still a problem.
    It's not about the use of brackets or parentheses, but what they mean and where they go. As you have not posted an example of setting the polygon's path the long way, it's hard to show you how to shorten it. Post what you have that works, and we will show you how to shorten it. (I suppose some with more patience than I are willing to go look up what we think it is you are trying to do, and then interpret it. But I would much rather you show me the code you have that works, and then your attempts to transform or shorten it and change its notation. This makes it much much easier to help you, and it should also make the help more effective, by contextualizing it. As an added benefit, when someone else reads your post and tries to learn from it, they will gain more.)
    So again, please provide a clear example of the "long way" to do the thing you are attempting, and then your attempt at shortening it.

  • About implementing the "add'" function in web dynpro

    hi guyes,
    now i want to implement the "add" function in the webdynpro. i bind a model node to the inputfields. and then i call the webservice ,but it does not work . the webservice is good . what happened to my project on earth? can anybody tell me what i should pay attention to in my code? my node structure is below:
    AddTicketworkhour==
       ticketworkhourbean
           name
           remark
       userId
    the root node is AddTicketworkhour ,it contains ticketworkhourbean and userId,    ticketworkhourbean contains name and remark.
    Thanks A Lot !

    public onActionSave(  ){
    wdContext.currentAddWorkscheduleBeanElement().setConsultantName("qinlei");
        wdContext.currentAddWorkscheduleBeanElement().setDistrictName(wdContext.currentDisplayElement().getName());
        wdContext.currentAddWorkscheduleBeanElement().setRowId(123456789);
        wdContext.currentAddWorkscheduleBeanElement().setLocation(wdContext.currentDisplayElement().getRowId());
        wdContext.currentAddWorkscheduleBeanElement().setWorkerId(12345678);
        wdContext.currentAddWorkscheduleBeanElement().setWorkDate(new Timestamp(wdContext.currentContextElement().getWorkDate().getTime()));
         wdContext.currentAddWorkscheduleElement().setUserId(100);
        boolean result = wdThis.wdGetMyWorkscheduleUICompController().addWorkschedule();
    wdDoInit( ){
    MyWorkscheduleAddModel addModel = new MyWorkscheduleAddModel();
                    AddWorkschedule addWorkschedule = new AddWorkschedule(addModel);
                    WorkscheduleBean addBean = new WorkscheduleBean(addModel);
                    addWorkschedule.setBean(addBean);
                    IAddWorkscheduleElement addWorkscheduleElement = wdContext.createAddWorkscheduleElement(addWorkschedule);
                    wdContext.nodeAddWorkschedule().bind(addWorkscheduleElement);
    Is there anywrong with my wdDoIt( )?
    谢谢!

  • Print preview for the spool request without actual printer hooked u to SAP

    Hi,
    We do not have any printer connected to SAP system. But the business team just wants to do print preview of a document using the SAP local printer settings thorough SP01. They do not want to print it.
    They say that SAP has many printer drivers in its setting. So even if the printer is not attached they should be at least able to do a print preview ?
    Is this possible ? What do I need to do ?
    Regards,
    Rajesh.

    Rajesh Thomas,
    the preview function needs a printer - for whatever reason.
    If NO printer is defined in the system, someone should be able to set up a printer, i.e. locl with driver SAPWIN. Try.
    Regards,
    Clemens

  • Can I create the family function without a credit card?

    My problem is I have no credit card and want to use the family share function!

    The Organizer must have a credit card attached to their account to set up family sharing.

  • When is the entire function group added to the transport request

    When you modify a functionmodule in a function group, only the object of the functionmodule( LIMU FUNC) is added to the transport request.
    When you modify an include of the function group, the reportsource of that include (LIMU REPS) is added to the transport request.
    But under some circumstances the entire function group is added to the transport request (R3TR FUGR).
    Can somebody clarify under what circumstances the entire Function Group is added to the transport request?

    I was actually looking for the reason why I would find R3TR FUGR objects in requests for existing function groups.
    What I found out is that R3TR FUGR is added to the request when :
    - the function group is created
    - a function is renamed
    - the function group is deleted
    - you choose : Write Transport Entry, in the context menu of the Function group.
    The <b>actual problem </b> was that in our upgraded system (<b>ERP2005</b>) we had a transport containing the function group (R3TR FUGR) and <b>we thought</b> none of these actions had been taken.  After talking to the developer in question, I found out he did rename a function module, so I have my solution.
    But thanks everybody for the insight.
    Message was edited by: Dries Horions

  • How to call external functions without a .DLL (just using a .H and .LIB file)?

    Hello everyone,
    actually I'm facing little difficulties on how to get an external function getting called from within CVI (Version 2009).
    I was supplied with a .H file and a .LIB file to call an external function from within my CVI project. The .H file looks like this:
    void exportedFunction(double *parameter);
    As far as I know, the external function was written with MS Visual C++ 6.
    So I tried to statically link to the extern al function like this:
    - Add the .H file and the .LIB file to the CVI project
    - #include the .H file where I needed to call the external function
    - do the external function call
    When building I get an unresolved external function call error from CVI so this seems not to be working.
    I made some searches around and got up with two possible issues. Maybe one of you can help me get a bit further and get things working.
    1) The "real" function code is located in the DLL file which was not delivered to me. Or is there a way to get things done (call external functions) just with a .H and a .LIB file (without any .DLL file included)?
    2) The external function does not export according to "C-Style" rules. The function signature in the .H file shows no things like
    extern "C" __declspec(dllexport) void __stdcall ...
     Or maybe it's a combination of both issues (missing .DLL + wrong export style of function)?
    I guess I could get around the wrong export style of the function when I manage to write a wrapper around the original function that actually uses C-Style exporting. But I guess I need the .DLL file for this try as well.
    Thank you for your answers.
    Best regards,
    Bernd
    Solved!
    Go to Solution.

    There is no need  for the dllexport stuff. There is also the option for a static library without any DLL.  But the 'extern "C"' is essential, because it forces the C++  compiler, which was probably used to compile the library , to use C calling convention.
    If you can't ask the provider of the library to provide a version which was compiled using C calling convention the way to go is to write a wrapper with VC++6 around that library which reexports the functions using C calling convertion. Something like
    extern "C" type0 myfunc1(type1 arg1, ...) {
           return func1( arg1,...);
    for every function , you need to use.
    BTW. "unresolved symbol" is the linker error message, you can expect if you try to link C code against a library build with C++ calling convention.

  • Unable to add a printer. When I click on the "Add Printer" button, nothing happens.

    I have IE9 on Windows 7 PC.  I have compared my Internet options with another PC and it does not seem to have this issue. Any suggestions?
    NOTE: Please don't suggest changing browsers.  That is a work-around not a solution.
    Thanks

    Hi,
    Clicking the Add a Printer actually not much related with any web browser but more with the operating system functionaity.
    I would suggest you to try updating windows by running Windows Update, reboot the PC and check for any change.
    Also make sure the Print Spooler Service is running:
    Click the Start button and typr run into the search box.
    Open the Run Application within the results.
    Type net start spooler, then click OK
    You should see a black dialog for a single moment.
    Next go to Control Panel > Devices and Printers and try adding a printer again,
    If the option still not function  I would recommend you to contact Microsoft support as the problem relies within the operating system and not within the HP software.
    Regards,
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • When starting the Add-on: Connection timed out issue

    When starting the Add-on: Connection timed out issue
    Hi,
    We have a client in SAP 2005 PL 44.
    I built the add-on for them using simple installer wizard ( I tried advanced set-up also).
    When starting the add-on, I get the message 'Connection Timed Out'.
    Add-on status is failed.
    But the add-on is actually connected. i.e, The functionality associated with the add-on is working fine.
    I had SAP 2007 before and un/reinstalled SAP 2005 in order to connect with this client.
    I had built the same add-on in a similar way for the same client for lot many times in the past, but I never got this issue.
    I tried the following:
    1) Delete SM_OBS_DLL and un/reinstall DI API
    2) un/reinstall B1DE
    Always I'm getting this error.
    Please let me know your inputs.
    Thanks.
    Geetha

    Hi Geetha,
    The timeout issue has been discussed quite a bit already on this forum. Please do a search or look at these threads:
    Timed Out Error with ADDON
    Addon Connection Timed out
    Regards
    Aravind

  • With out using Weblogic libraries to maintain the same functionality

    Hi,
    Please tell the solution of my problem.Here application developed in Weblogic,now we are migrating that applicationin jboss.Here one java servlet program is there which is using Weblogic libraries to get the connection pool .
    How can change the code without using Weblogic libraries to maintain the same funtionality. Is there any alternate method to get the connection pools in Jboss.
    Here I am attaching the code ,please go througth the code and provide me the correct solution.
    package gsk.servlets;
    import java.io.*;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import javax.naming.Context;
    import javax.naming.NamingException;
    import javax.management.*;
    import javax.management.InstanceNotFoundException;
    import javax.management.InvalidAttributeValueException;
    import javax.management.Notification;
    import javax.servlet.*;
    import javax.servlet.http.*;
    //Below lines are commnented by Anupama on 29-09-05 to avoid using Weblogic libraries.
    //import weblogic.jndi.Environment;
    //import weblogic.management.MBeanHome;
    //import weblogic.management.MBeanCreationException;
    //import weblogic.management.*;
    //import weblogic.management.runtime.*;
    //import weblogic.management.configuration.*;
    //import weblogic.management.RemoteNotificationListener;
    //import weblogic.management.logging.WebLogicLogNotification;
    //import javax.management.Notification.*;
    //below lines are added by Anupama T on 29-09-05 to run the same functionality without using Weblogic libraries
    import org.jboss.management.*;
    import org.jboss.jdbc.*;
    import org.jboss.naming.*;
    import org.jboss.management.j2ee.MBean;
    import javax.management.AttributeChangeNotification;
    import javax.management.JMException;
    import javax.management.MalformedObjectNameException;
    import javax.management.MBeanServer;
    import javax.management.NotificationListener;
    import javax.management.ObjectName;
    import org.jboss.logging.Logger;
    import org.jboss.system.ServiceMBean;
    import gsk.adip.portal.GKMProperties;
    import gsk.adip.dbconnectionservice.DatabaseConnector;
    * @author jjc18400
    * The ConnectionsManager class acts as a Servlet that listens and
    * responds to events that are thrown by WebLogic MBeans. In particular,
    * it listens for failures in WebLogic connection pools, and attempts to
    * restore these pools.
    public class ConnectionsManager extends HttpServlet implements NotificationListener {
         private static Context ctx;
         private static MBean managedHome;
         private static MBean adminHome;
         private static String SERVER_NAME;
         private static String DOMAIN_NAME;
         private static MBeanServer myServer;
         private JDBCConnectionPoolRuntimeMBean connectionPoolMBean;
         private JDBCConnectionPoolMBean jdbcConnPoolMBean;
         private JDBCConnectionPoolMBean myPool;
         private static ResultSet rset = null;
         public void init(ServletConfig config) throws ServletException {
              super.init(config);
              System.out.println("Initializing the ConnectionsManager servlet.");
              SERVER_NAME = GKMProperties.getProperty("GKM_SERVER_NAME");
              DOMAIN_NAME = GKMProperties.getProperty("DOMAIN_NAME");
              findMBeans();
              testConnectionPool("GENNETConnectionPool");
              try {
                   //findConnPool("GENNETConnectionPool").addNotificationListener(this, null, null);
                   RemoteMBeanServer rmbs = adminHome.getMBeanServer();
                   WebLogicObjectName oname =
                        new WebLogicObjectName("TheLogBroadcaster", "LogBroadcasterRuntime", DOMAIN_NAME, SERVER_NAME);
                   rmbs.addNotificationListener(oname, this, null, null);
              catch (IllegalArgumentException e) {}
              catch (MalformedObjectNameException e) {}
              catch (InstanceNotFoundException e) {}          
         public void handleNotification(Notification notification, Object obj) {
              WebLogicLogNotification wln = (WebLogicLogNotification)notification;
              System.out.println("\nWebLogicLogNotification");
              System.out.println(" type = " + wln.getType());
              System.out.println(" message id = " + wln.getMessageId());
              System.out.println(" server name = " + wln.getServername());
              System.out.println(" timestamp = " + wln.getTimeStamp());
              System.out.println(" message = " + wln.getMessage() + "\n");
         private void testConnectionPool(String poolName) {
              JDBCConnectionPoolMBean aPool = findConnPool(poolName);
              JDBCConnectionPoolRuntimeMBean aRuntimeMBean = findRuntimeMBean(poolName);
              /*while(aRuntimeMBean.getPoolState()) {
                   try {
                        Thread.sleep(6000);
                        System.out.println("Thread is sleeping.");
                   catch (InterruptedException ie) {
              retargetConnPool(aPool);
         private JDBCConnectionPoolRuntimeMBean findRuntimeMBean(String aPoolName) {
              JDBCConnectionPoolRuntimeMBean aRuntimeMBean = null;
              if (managedHome != null) {
                   try {
                        aRuntimeMBean = (JDBCConnectionPoolRuntimeMBean)managedHome.
                                  getRuntimeMBean(aPoolName, "JDBCConnectionPoolRuntime");
                   catch (InstanceNotFoundException e) {
                        System.out.println("Unable to find the JDBCConnectionPoolRuntimeMBean: " + e);
                        aRuntimeMBean = null;
              return aRuntimeMBean;
         private JDBCConnectionPoolMBean findConnPool(String poolName) {
              if (adminHome != null) {
                   try {
                        myPool = (JDBCConnectionPoolMBean)adminHome.getMBean(poolName, JDBCConnectionPoolMBean.class);
                   catch (InstanceNotFoundException e) {
                        System.out.println("Unable to find the JDBCConnectionPoolMBean: " + e);
                        myPool = null;
              return myPool;
         private void retargetConnPool(JDBCConnectionPoolMBean aPool) {
              //System.out.println("The connection pool: " + aPool.toString() + " is not responding.\nAttempting to retarget the pool...");
              try {
                   System.out.println("Attempting to remove " + myServer.toString() + " from the connection pool target list.");
                   aPool.removeTarget(myServer);
                   System.out.println("Removal successful: " + aPool.getTargets().toString());
                   aPool.addTarget(myServer);
                   System.out.println("Addition successful: " + aPool.getTargets().toString());
              catch (InvalidAttributeValueException e) {
                   System.out.println(e.toString());
              catch (DistributedManagementException e) {
                   System.out.println(e.toString());
         public void doPost(HttpServletRequest req, HttpServletResponse resp)
                   throws ServletException, IOException {
              String poolName = (String)req.getParameter("poolName");
              String dataSource = (String)req.getParameter("dataSource");
              //System.out.println("req.getAttribute(poolName) is: " + poolName);
              //System.out.println("req.getAttribute(dataSource) is: " + dataSource);
              String message = runTestQuery(dataSource);
              getConnectionPoolMBean(poolName);
              resp.setContentType("text/html");
              PrintWriter out = resp.getWriter();
              out.println("<html>");
              out.println(" <head><title>The ConnectionsManager Responds:</title></head>");
              out.println(" <body>");
              out.println(" <h1>" + message + "</h1>");
              out.println(" </body>");
              out.println("</html>");
         public void destroy() {
              System.out.println("Destroying the ConnectionsManager servlet.");
         public String getServletInfo() {
              return "This servlet monitors and corrects errors in WebLogic connection pools.";
         /**private void runTests() {
              while (false) {
                   rset = testConnection();
                   if (rset == null) {
                        resetConnectionPool();                    
                   try {
                        wait();
                   catch (InterruptedException e) {}
         private String runTestQuery(String dataSource) {
              String statusMessage = "";
              Connection conn = null;
              Statement stmt = null;
              ResultSet rset = null;
              //String aPoolName = "GENNETConnectionPool";
              String aSql = "select * from dual where 1 = 1";
              try {
                   conn = DatabaseConnector.getDatabaseConnection(dataSource);
                   System.out.println("Established database connection.");
                   if (conn != null) {
                        conn.setAutoCommit(false);
                        stmt = conn.createStatement();
                        rset = stmt.executeQuery(aSql);
                        statusMessage = "The connection \'" + dataSource + "\' is OK.";
              catch (Exception e) {
                   try {
                        conn.rollback();
                   catch (Exception e1) {}
                   e.printStackTrace();
                   statusMessage = "The connection \'" + dataSource + "\' has failed.\n" + e.toString();
              finally {
                   try {
                        if (stmt != null) stmt.close();
                        if (conn != null) conn.close();
                   catch (Exception e) {
                        e.printStackTrace();
                   return statusMessage;
         public void resetConnectionPool() {
         private void findConnPoolRuntimeMBean(String poolName) {
              try {
                   connectionPoolMBean = (JDBCConnectionPoolRuntimeMBean)managedHome.getRuntimeMBean(poolName, "JDBCConnectionPoolRuntime");
              catch (InstanceNotFoundException e) {
                   System.out.println("Unable to find the JDBCConnectionPoolRuntimeMBean: " + e);
         private void findMBeans() {
              Environment env = new Environment();
              try {
                   ctx = env.getInitialContext();
                   managedHome = (MBeanHome)ctx.lookup(MBeanHome.JNDI_NAME + "." + SERVER_NAME);
                   System.out.println(MBeanHome.JNDI_NAME + "." + SERVER_NAME + " -- managedHome found successfully.");
                   adminHome = (MBeanHome)ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
                   System.out.println(MBeanHome.ADMIN_JNDI_NAME + " -- adminHome found successfully.");
                   myServer = (ServerMBean)adminHome.getMBean(SERVER_NAME, ServerMBean.class );
                   System.out.println(MBeanHome.ADMIN_JNDI_NAME + " -- " + SERVER_NAME + " instance found successfully.");
                   ctx.close();
              catch (NamingException e) {
                   System.out.println("Naming Exception: " + e);
                   managedHome = null;
                   adminHome = null;
              catch (InstanceNotFoundException e) {
                   System.out.println("Unable to find the JDBCConnectionPoolMBean: " + e);
         public String displayHomeName() {
              getConnectionPoolMBean("GENNETConnectionPool");
              if (managedHome != null) {
                   return new String("MBeanHome found successfully.");
              else return new String("MBeanHome not found.\nSee WL Console for error.");
         private void getConnectionPoolMBean(String poolName) {
              String thisPoolName = poolName;
              connectionPoolMBean = null;
              if (managedHome != null) {
                   try {
                        connectionPoolMBean =
                             (JDBCConnectionPoolRuntimeMBean)managedHome.getRuntimeMBean(thisPoolName, "JDBCConnectionPoolRuntime");
                        if (connectionPoolMBean != null) {
                             System.out.println("JDBCConnectionPoolRuntime found successfully.");
                             System.out.println("connectionPoolMBean.toString() is: " + connectionPoolMBean.toString());
                             System.out.println("connectionPoolMBean.getFailuresToReconnectCount() is: " + connectionPoolMBean.getFailuresToReconnectCount());
                             System.out.println("connectionPoolMBean.getPoolState() is: " + connectionPoolMBean.getPoolState());
                   catch (InstanceNotFoundException e) {
                        System.out.println("Unable to find the JDBCConnectionPoolRuntimeMBean: " + e);
                        connectionPoolMBean = null;
              // Obtain MBeanHome for the administration server.
              /*JDBCConnectionPoolMBean mbean = (JDBCConnectionPoolMBean)home.
                        getConfigurationMBean(poolName, "JDBCConnectionPoolConfig");
              mbean.setConnLeakProfilingEnabled(true);
              mbean.setSqlStmtParamLoggingEnabled(true);
              mbean.setSqlStmtMaxParamLength(maxLen);*/
              /*try {
                   mypool = (JDBCConnectionPoolMBean)mbh.getMBean( "mypool",
                   JDBCConnectionPoolMBean.class );
              catch( javax.management.InstanceNotFoundException e ) {
                   mypool = (JDBCConnectionPoolMBean) mbh.createAdminMBean( "mypool",
                        "JDBCConnectionPool", "mydomain" );
                   mypool.addTarget( myserver );
                   mypool.setDriverName( "org.gjt.mm.mysql.Driver" );*/
              if (adminHome != null) {
                   try {
                        myPool = (JDBCConnectionPoolMBean)adminHome.getMBean(poolName, JDBCConnectionPoolMBean.class);
                   catch (InstanceNotFoundException e) {
                        System.out.println("Unable to find the JDBCConnectionPoolMBean: " + e);
              if (myPool != null) {
                   //System.out.println("myPool.getMaxCapacity() is: " + myPool.getMaxCapacity());
                   try {
                        myPool.setMaxCapacity(10);
                        System.out.println("Before: myPool.getMaxCapacity() is: " + myPool.getMaxCapacity());
                        myPool.setMaxCapacity(100);
                        System.out.println("After: myPool.getMaxCapacity() is: " + myPool.getMaxCapacity());
                   catch (InvalidAttributeValueException e) {
                        System.out.println("Max Capacity is an invalid value.");
                   //System.out.println("myPool.getMaxCapacity() is: " + myPool.getMaxCapacity());
    }

    Hy, i've got the same problem as you. Did you find out a solution.
    If so, please contact me. Thanks a lot.
    Lorenzo

  • AddNew function without utilizing button

    I have a database created in Microsoft Access. I want the pdf to be opened and automatically execute the addNew function without having the user click on the addNew button. Everytime it is opened I want the form to understand that the users only intention is to add data to the database. My knowledge of javascript is minimal and this form is simple data entry that will be trended. Please help.

    My movie has 1 frame. I deleted the layer that had the button, so I have an AS layer with the following code in it.
    txt_ani.startTypeEffect();
    And a layer below it with my movie clip with the Function code on one layer and the text in another layer below it.
    When I do play it, nothing happens. But when I add some frames to the movie, it starts after a delay, but I keep seeing "START" in my output tab due to the Trace I have, which makes the text appear very quickly. I think I may need some code to stop it from restarting.
    Where should this code you provided be put? And do I need additional code to have the text not speed up?

  • After updating Firefox to 5.0.1 the add-ons Manager did not show any of my add-ons, although they were all running.

    After updating Firefox to 5.0.1 the add-ons Manager did not show any of my add-ons, although they were all running. Several restarts of Firefox, even with the add-ons disabled did not bring them back. I then installed another add-on and after restarting, all of the previous add-ons are now shown in the manager.
    Running on Mac 10.5.8. Add-ons installed:
    Adblock Plus, Add-on Compatibility reporter, Ant Video Downloader, Forecastfox, Google toolbar, Reload Every, Session Manager, and Steep and Cheap Watcher.
    Note: the troubleshooting information was taken after the problem was fixed. Prior to fixing the issue, there were no items under the Extensions heading. Add-on Compatibility Reporter was the add-on that was added to restore all of the other add-ons, even though it was already installed.

    '''Good to know you solved your own problem by simply installing another extension''', I like solutions that aren't going to cause extra work, or loss of data.
    Here is what people normally have to do for missing extensions, as if not installed.-- <br>https://support.mozilla.com/questions/826729
    :http://kb.mozillazine.org/Unable_to_install_themes_or_extensions_%28Firefox%29
    FWIW, renaming or deleting extensions.sqlite and the other files beginning with "extensions." causes the files to be rebuilt from the extensions directory, so nothing is lost, but they will be restored in alphabetical order.
    I've solved places.sqlite problems by simply restoring a bookmarks backup, or creating a bookmarks backup and restoring that rather than face loss of history.
    Please mark as solved so others will see your answer when looking for solved problems as solutions to there own or other people's problems.

  • BRFplus: Adding Intermediate Data Objects to Expression Workarea

    Hi all,
    running BRFplus on NW 70105.
    I have a Step Sequence Expression with multiple steps calling various Functions.  Some of the Functions return intermediate results which must be stored in the context workarea.
    I would like to add these Data Objects to the workarea.  However the system will not allow me to do this without first adding the Data Objects as signature parameters of the calling Function, even though this does not make sense for intermediate values.
    Clicking the "Add existing Data Object" button for the workarea only allows me to add Data Objects which are in the context of the calling Function.
    Conversely if a Data Object is deleted from the calling Function's signature, then when checked the Function issues error message "Assigned expression uses Element CUSTOMER/Customer which is not in the context".
    Is the requirement to add all Expression workarea Data Objects to the calling Function's signature intended, or is this a bug ?  Or is there some other way of doing it that I am missing ??
    Thanks & regards,
    Grogan

    This is a restriction in NW 701. This restriction is removed in NW 702.

  • Adding hyperlinks to objects in 3D PDF

    Hi everyone,
    I'm trying to figure out if 3D PDF has the capability to import a number of individual machine models (made in SolidWorks) to create a 3D layout of a facility, and then make it so people viewing this layout can click (or doubleclick) on a machine and have that open a web page (or another .pdf file)...are there javascript routines that get called when one of the objects is clicked/doubleclicked? If so, can that script be used to open up a url?
    Any help would be appreciated,
    Thanks,
    Jon Fournier

    On second thought, here is the an example code for adding hyperlinks to objects. It will be very tedious to do this for a huge number of parts. If metadata could be stored (no such luck) in the u3d file, this process would be very easy.
    - Greg
    http://www.immdesign.com
    The u3d file and pdf example are available using the links:
    http://www.immdesign.com/templates/hyperlink.pdf
    http://www.immdesign.com/templates/robotHand.u3d
    Parts of the code below were given to me by Grayson Lang.
    The code below must be added as a document level javascript
    use the menu - Advanced->Javascript->Document Javascript...
    // -------- Start of Document Script
    initialize3D = function ()
    var a3d = getAnnots3D(0)[0];
    var c3d = a3d.context3D;
    if ( a3d.activated )
    app.clearInterval( timeout );
    c3d.runtime.doc = this;
    c3d.runtime.app = app;
    var timeout = app.setInterval( "initialize3D()", 200 );
    // -------- End of Document Script
    // -------- Start of 3D Script
    // Save this code in as a .js file and use it as the default
    // script when inserting the u3d file into your PDF file
    // ugly code to add hyperlinks on selection of an object
    // this will only work with URLs and will not work for
    // just openning any old file
    // format for the hyperlink array -
    // hLinks["the object's name"] = "file URL"
    var hLinks = new Array;
    hLinks["fingertip-1"] = "http://www.immdesign.com"
    hLinks["fingertip-2"] = "http://www.myroombud.com"
    hLinks["fingertip-3"] = "http://www.adobe.com"
    function onSelection( objName ) {
    if ( typeof( hLink = eval( "hLinks['" + objName + "']" ) ) != 'undefined' ) {
    if (runtime.app) { runtime.app.launchURL(hLink); }
    // ack! we have to create our own "pick" function since there is no way
    // to get the selected object from the Acrobat pick right now
    var downX = -999999999999;
    var downY = -999999999999;
    var mouseDown = 0;
    myMouseHandler = new MouseEventHandler();
    myMouseHandler.onMouseDown = true; //this prop is true by default
    myMouseHandler.onMouseUp = true; //this prop is true by default
    myMouseHandler.onMouseMove = true;
    myMouseHandler.reportAllTargets = false;
    myMouseHandler.onEvent = function(event)
    // capture mouse down location
    if ( event.isMouseDown ) {
    downX = event.mouseX
    downY = event.mouseY
    mouseDown = 1;
    else {
    // check if mouse up is the same location as mouse down
    if ( event.isMouseUp ) {
    if ( downX == event.mouseX && downY == event.mouseY ) {
    if ( event.hits.length ) {
    objName = event.hits[0].target.name;
    onSelection( objName );
    downX = -999999999999;
    downY = -999999999999;
    mouseDown = 0;
    //Register the handler and turn the mule on
    runtime.addEventHandler(myMouseHandler);
    // ------ End of 3D Script

  • I used scripting brigde to add a movie that has size bigger than 5GB, exactly after two minutes iTunes return a failed, but the processing of the file is actually added to iTunes Library successfully. The copying take more than 5 minutes to complete. Why?

    I used scripting brigde to add a movie that has size bigger than 5GB, exactly after two minutes iTunes return a failed, but the processing of the file is actually added to iTunes Library successfully. The copying take more than 5 minutes to complete. Why the iTunes Scripting Brigde returned failed when it is actually success? It occurred exactly 2 minutes after submit the request to Scripting Brigde. Is this 2 minutes related to the Apple Event time out? if it does, how do I get around this problem? thx

    I can tell you that this is some of the absolutely worst customer service I have ever dealt with. I found out from a store employee that when they are really busy with calls, they have third party companies taking overflow calls. One of those companies is Xerox. What can a Xerox call center rep possibly be able to authorize on a Verizon account?  I'm Sure there is a ton of misinformation out there due to this. They don't note the accounts properly or so everyone can see them. I have been transferred before and have asked if they work for Verizon or a third party also and was refused an answer so, apparently they aren't required to disclose that information. I spent a long time in the store on my last visit and it's not just customers that get the runaround. It happens to the store employees as well and it's beyond frustrating.

Maybe you are looking for