Please, URGENT! Access objects in JInternalFrame

I need to access a specific object in a JInternal frame, e.g. a JTextField. I have different istance of the same JInternalFrame that contain a JTabbedPane with different pane. I use the getSelectedFrame() method to get the JInternalFrame handle of the focused JInternalFrame, but I don't know how to reference the JTextField contained in one of the pane contained in the JTabbedPane contained in the JInternalFrame.
please help me soon

well if the JInternal frame is in its own class file then in that same file make a method like
public JTextArea getTextArea(){
return this.<JTextArea>;
that way you can access it like
getSelectedFrame().getTextArea().setText("wadadadadadadadadada");
or summin like that

Similar Messages

  • Confusion... Data Access Object and Collection Class

    Please help me...
    i have a Book class in the library system, so normally i would have a Collection class eg. BookCollection class which keeps an array/ arrayList of Book objects. In BookCollection class i have methods like
    "searchBook(BookID)" which would return me a Book object in the array.
    But now i'm confused with Data Access Object... In sequence diagrams there's a "Data Access class" which is used to retrieve data from and send data to a database. So, if i have the Data Access class, do i still need BookCollection class? Because BookCollection serves as a database also rite? ...

    I think you're in the right rail.
    The BookCollection class could be still usefull if you will need to manage search results with more than onne record (e.g.: search by author name).

  • Data access object pattern

    Hello,
    I am trying to implement the Data Access Object pattern and I have the following bean:
    package com.netpepper.ecards;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import javax.faces.application.Action;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    * @author Julien Martin
    * Card class: represents the card sent from a member of the public (the sender)
    * to another member of the public (the recipient).
    public class Card {
         private static Log log = LogFactory.getLog(Card.class);
         private long id;
         private String from_email;
         private String to_email;
         private String image;
         private String bgcolor;
         private String font;
         private String from_name;
         private String to_name;
         private String message;
         private String title;
         private boolean received;
         private boolean sent;
         private String send_date;
         private String response;
          * Public empty no-arg constructor
         public Card() {}
          * Full-fledged constructor
         public Card(
              long id,
              String from_email,
              String to_email,
              String image,
              String bgcolor,
              String font,
              String from_name,
              String to_name,
              String message,
              String title,
              boolean received,
              boolean sent,
              String send_date) {
              setId(id);
              setFrom_email(from_email);
              setTo_email(to_email);
              setImage(image);
              setBgcolor(bgcolor);
              setFont(font);
              setFrom_name(from_name);
              setTo_name(to_name);
              setMessage(message);
              setTitle(title);
              setReceived(received);
              setSent(sent);
              setSend_date(send_date);
          * @return the background color choosed by the sender.
         public String getBgcolor() {
              return bgcolor;
          * @return the font choosed by the sender.
         public String getFont() {
              return font;
          * @return the sender's email.
         public String getFrom_email() {
              return from_email;
          * @return the sender's name.
         public String getFrom_name() {
              return from_name;
          * @return the card's id.
         public long getId() {
              return id;
          * @return the image choosed by the sender.
         public String getImage() {
              return image;
          * @return the message input by the sender.
         public String getMessage() {
              return message;
          * @return <code>true</code> if the card has been received, <code>false</code> otherwise.
         public boolean isReceived() {
              return received;
          * @return <code>true</code> if the card has been sent, <code>false</code> otherwise.
         public boolean isSent() {
              return sent;
          * @return the title choosed by the sender.
         public String getTitle() {
              return title;
          * @return the recipient's email.
         public String getTo_email() {
              return to_email;
          * @return the recipient's name.
         public String getTo_name() {
              return to_name;
          * @param the background color choosed by the sender.
         public void setBgcolor(String string) {
              bgcolor = string;
          * @param the font choosed by the sender.
         public void setFont(String string) {
              font = string;
          * @param the sender's email.
         public void setFrom_email(String string) {
              from_email = string;
          * @param the sender's name.
         public void setFrom_name(String string) {
              from_name = string;
          * @param the card's id.
         public void setId(long i) {
              id = i;
          * @param the image choosed by the sender.
         public void setImage(String string) {
              image = string;
          * @param the message input by the sender.
         public void setMessage(String string) {
              message = string;
          * @param <code>true</code> if the card has been received, <code>false</code> otherwise.
          * If the application attempts to set the received field to true,
          * then the received field of the Card object is persisted to database
          * and an email is sent to the sender to notify them that the card has been received.
         public void setReceived(boolean b) {
              if (this.received == false && b == true) {
                   Mailer m = new Mailer();
                   try {
                        m.sendAcknowlegement(
                             to_email,
                             from_email,
                             from_name,
                             to_name,
                             id);
                        Connection con = DBConnection.getConnection();
                        PreparedStatement ps =
                             con.prepareStatement(Queries.setReceivedQuery);
                        ps.setLong(1, this.id);
                        ps.executeUpdate();
                        con.close();
                        this.received = true;
                   } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
          * @param <code>true</code> if the card has been sent, <code>false</code> otherwise.
          * If the application attempts to set the send field to true,
          * then the sent field of the Card object is persisted to database.
         public void setSent(boolean b) {
              if (this.sent == false && b == true) {
                   try {
                        Connection con = DBConnection.getConnection();
                        PreparedStatement ps =
                             con.prepareStatement(Queries.setSentQuery);
                        ps.setLong(1, this.id);
                        ps.executeUpdate();
                        con.close();
                   } catch (SQLException e) {
                        log.error("ERROR: impossible to update the sent field");
                        e.printStackTrace();
          * @param the title choosed by the sender.
         public void setTitle(String string) {
              title = string;
          * @param the recipient's email.
         public void setTo_email(String string) {
              to_email = string;
          * @param the recipient's name.
         public void setTo_name(String string) {
              to_name = string;
          * @return the send date.
         public String getSend_date() {
              return send_date;
          * @param the send date.
         public void setSend_date(String string) {
              send_date = string;
          * @return <code>true</code> if email has been sent, <code>false</code> otherwise.
         public boolean sendEmail() {
              try {
                   Mailer sm = new Mailer();
                   sm.sendCard(
                        this.from_email,
                        this.to_email,
                        this.from_name,
                        this.to_name,
                        this.id);
                   return true;
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   return false;
          * Retrieve the card from the database
         public static Card getCardFromId(int id) {
              Card c = new Card();
              c.id = id;
              try {
                   Connection con = DBConnection.getConnection();
                   PreparedStatement ps = con.prepareStatement(Queries.getCardFromID);
                   ps.setInt(1, id);
                   ResultSet rs = ps.executeQuery();
                   if (rs.next()) {
                        c.setBgcolor(rs.getString("db_bgcolor"));
                        c.setFont(rs.getString("db_font"));
                        c.setFrom_email(rs.getString("db_from_email"));
                        c.setTo_email(rs.getString("db_to_email"));
                        c.setFrom_name(rs.getString("db_from_name"));
                        c.setTo_name(rs.getString("db_to_name"));
                        c.setFont(rs.getString("db_font"));
                        c.setMessage((String) rs.getObject("db_message"));
                        c.setTitle(rs.getString("db_title"));
                        c.setSend_date(rs.getString("db_send_date"));
                        c.setImage(rs.getString("db_image"));
                        if (rs.getString("db_received").equals("y")) {
                             c.received = true;
                        } else if (rs.getString("db_received").equals("n")) {
                             c.setReceived(true);
                        if (rs.getString("db_sent").equals("y")) {
                             c.setSent(true);
                        } else if (rs.getString("db_sent").equals("n")) {
                             c.setSent(false);
                   System.out.println(c);
                   //con.close();
                   return c;
              } catch (SQLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   return null;
         public String toString() {
              return ("Title: " + this.title + ", " + "Id: " + this.id);
          * @param string
         public void setResponse(String string) {
              response = string;
         protected String saveCard() {
              try {
                   Connection con = DBConnection.getConnection();
                   PreparedStatement ps = con.prepareStatement(Queries.saveCard);
                   ps.setLong(1, (new java.util.Date()).getTime());
                   ps.setString(2, this.from_email);
                   ps.setString(3, this.to_email);
                   ps.setString(4, this.image);
                   ps.setString(5, this.bgcolor);
                   ps.setString(6, this.font);
                   ps.setString(7, this.from_name);
                   ps.setString(8, this.to_name);
                   ps.setString(9, this.message);
                   ps.setString(10, this.title);
                   ps.setString(11, this.send_date);
                   ps.executeUpdate();
                   con.close();
                   return "saved";
              } catch (SQLException e) {
                   log.error("ERROR: impossible to save the card");
                   e.printStackTrace();
                   return "notSaved";
         public Action getSaveCard() {
              return new Action() {
                   public String invoke() {
                        return saveCard();
    }The full source code for the project can be downloaded here:
    http://cours.java.free.fr/ecards-project/
    I would like to decouple the bean from the jdbc but I don't know how to. Can anyone help please?
    I found some sampes here http://access1.sun.com/codesamples/DataAccessObject.html
    but it does not have any update jdbc.
    Julien.

    Your DAO should have methods for getting and setting beans.
    For example:
    public Card getCard(long id){...}
    public void updateCard(Card c) {...}

  • Data Access Objects : JDBC Driver Not Found

    Hi,
    I am having a strange problem accessing JDBC Driver ( for Informix Database, if this
    information helps )
    I am using Data Access Objects ( DAOs ) to fetch multiple records.
    The DAO is accessed from Session Bean for this case.
    The constructor of the DAO does the JNDI lookup for the TxDataSource
    and set it to a class attribute of the DAO. This DataSource is pointing
    to a connection pool
    In the getConnection() private method if DAO we use this DataSource
    to pickup a onnection from the pool and fire a sql query.
    This public method say getMultipleRecords( query conditions ) of DAO
    returns a number of macthing records to the Session Bean.
    This approach works fine in general. But sometimes I get an
    java.sql.SQLException
    SQLException ERROR MESSAGE is:
    "Error accessing jdbc driver: driverURL = jdbc:weblogic:pool:myConnPool, props= {enableTwoPhaseCommit=true,
    connectionPoolID=myConnPool}"
    Once this exception occurs every time the method is called the same exception keep
    coming.
    Once I restart the server this API starts working again.
    Could anyone give any reason why this exception might occur.
    Please send an e-mail to [email protected] while replying to this message.
    Thanks in advance
    Gunajit

    Hi Gunajit
    you need to ensure that the connections are properly closed. If you are
    closing the connections properly, increase the number of connections in the
    connection pool.
    hth
    sree
    "Gunajit" <[email protected]> wrote in message
    news:3ce082ca$[email protected]..
    >
    Hi,
    I am having a strange problem accessing JDBC Driver ( for InformixDatabase, if this
    information helps )
    I am using Data Access Objects ( DAOs ) to fetch multiple records.
    The DAO is accessed from Session Bean for this case.
    The constructor of the DAO does the JNDI lookup for the TxDataSource
    and set it to a class attribute of the DAO. This DataSource is pointing
    to a connection pool
    In the getConnection() private method if DAO we use this DataSource
    to pickup a onnection from the pool and fire a sql query.
    This public method say getMultipleRecords( query conditions ) of DAO
    returns a number of macthing records to the Session Bean.
    This approach works fine in general. But sometimes I get an
    java.sql.SQLException
    SQLException ERROR MESSAGE is:
    "Error accessing jdbc driver: driverURL = jdbc:weblogic:pool:myConnPool,props= {enableTwoPhaseCommit=true,
    connectionPoolID=myConnPool}"
    Once this exception occurs every time the method is called the sameexception keep
    coming.
    Once I restart the server this API starts working again.
    Could anyone give any reason why this exception might occur.
    Please send an e-mail to [email protected] while replying to this
    message.
    >
    Thanks in advance
    Gunajit

  • Unable to access objects in my own schema -- imported from SQL Server

    Hi All,
    I have imported some tables from MS SQL SERVER 2005 to Oracle 9i (9.2.0.1.0) on Windows machine.
    When I fire the query like "SELECT * FROM TAB", I can see the list of all those tables that I have imported, but the problem is that if I try to fetch the data from a specific table, the error is shown as "TABLE OR VIEW DOES NOT EXISTS".
    Can you please suggest me some work around to get the data from the tables?
    Thanks in advance
    Himanshu

    Replied in your Re: Unable to access objects in my own schema -- imported from SQL Server.
    Yoann.

  • Database access code in objects constructor, or in data access object

    Given an object that is stored in a database, is it better to have the database access code in a constructor method, or a data access layer object? E.g. I have a Person class
    public class Person{
    int Id;
    String name;
    int age;
    }When I want to read a person's details from the database, I could use a constructor something like this:
    public Person(int id){
    Connection con = getDatabaseConnection();
    ResultSet rs = con.createStatement().executeQuery("Select name, age from person where person_id = " + id);
    rs.next();
    this.name = rs.getString(1);
    this.age=rs.getInt(2);
    }Or I could use a method in a data access object :
    public Person getPerson(int id){
    Person p = new Person();
    Connection con = getDatabaseConnection();
    ResultSet rs = con.createStatement().executeQuery("Select name, age from person where person_id = " + id);
    rs.next();
    p.setName(rs.getString(1));
    p.setAge(rs.getInt(2));
    return p;
    }It seems to me that the constructor approach has two advantages
    (1) the SQL code is kept in the relevant class (so if I want to add a field to Person, I only have to make changes to the Person class)
    (2) I don't have to have a setter method for each field
    Is one or other of these ways generally recognized as 'best practise'?

    malcolmmc wrote:
    But then, on the other hand, everytime a Person gains a new field that's two places you have to change it. if the persistence interface is written in terms of the object and uses ORM, I don't have to touch the implementation. all i have to do is update the object, the database, and the mapping - just like you and your home brew ORM.
    besides, so what? i'd fear the resource leak, bad layering, more difficult testing more.
    Actually lately I've used annotations to label setters with database field names and run a simple home brew ORM to convert rows into objects even when not using a more complex persistence manager.home brew ORM? why is that necessary when you can choose from hibernate, ibatis, jdo, jpa, etc.? that's just nuts.
    %

  • How to access objects in the Child Form from Parent form.

    I have a requirement in which I have to first open a Child Form from a Parent Form. Then I want to access objects in the Child Form from Parent form. For example, I want to insert a record into a block present in Child Form by executing statements from a trigger present in Parent Form.
    I cannot use object groups since I cannot write code into Child Form to first create object groups into Child Form.
    I have tried to achieved it using the following (working of my testcase) :
    1) Created two new Forms TESTFORM1.fmb (parent) and TESTFORM2.fmb (child).
    2) Created a block named BLK1 manually in TESTFORM1.
    3) Created two items in BLK1:
    1.PJC1 which is a text item.
    2.OPEN which is a push button.
    4) Created a new block using data block wizard for a table EMPLOYEE_S1. Created items corresponding to all columns present in EMPLOYEE_S1 table.
    5) In WHEN-NEW-FORM-INSTANCE trigger of TESTFORM1 set the first navigation block to BLK1. In BLK1 first navigable item is PJC1.
    6) In WHEN-NEW-ITEM-INSTANCE of PJC1, code has been written to automatically execute the WHEN-BUTTON-PRESSED trigger for the "Open" button.
    7) In WHEN-BUTTON-PRESSED trigger of OPEN item, TESTFORM2 is opened using the following statement :
    open_form(‘TESTFORM2',no_activate,no_session,SHARE_LIBRARY_DATA);
    Since its NO_ACTIVATE, the code flows without giving handle to TESTFORM2.
    8) After invoking OPEN_FORM, a GO_FORM(‘TESTFORM2’) is now called to set the focus to TESTFORM2
    PROBLEM AT HAND
    ===============
    After Step 8, I notice that it passes the focus to TESTFORM2, and statements after go_form (in Parent Form trigger) doesnot executes.
    I need go_form with no_activate, similar to open_form.
    Edited by: harishgupt on Oct 12, 2008 11:32 PM

    isn't it easier to find a solution without a second form? If you have a second window, then you can navigate and code whatever you want.
    If you must use a second form, then you can handle this with WHEN-WINDOW-ACTIVATED and meta-data, which you have to store in global variables... ( I can give you hints if the one-form-solution is no option for you )

  • Accessing objects from an existing JVM on Windows

    I have a Java class that is running in an existing JVM which is running on local windows workstation. Is there a way I can access any methods or objects from the running Java class and other objects running inside the JVM from C or C++ code using Invocation API?. I know there is a way for us to ATTACH to a JVM that was created from C/C++ but I am looking for a way to access objects from a JVM that was started either as a service or started by other means.

    How did you start the C++ code?
    It is possible to load the c++ dll within your Java code then you may access the c++ code by using native methods out of Java. By calling the c++ method you have the pointer to your Java object and my use it (=> don't forget to use global references).
    If you have started both seperatly C++ in an extra process and Java in an extra process then it can be complicated. Guess that there aren't any easy solution.
    This mean: either you have your Java code loading a dll or you have C++ creating a JVM...

  • Best Practice Using Data Access Object Pattern

    I was wondering what would be the best approach with regards to implementing the Data Access Object pattern:
    Given the following database tables:
    teacher {teacher_id, teacher_name, ...}
    subject {subject_id, subject_name, ...}
    teacher_subject {teacher_id, subject_id}where teacher and subject hold details on teachers and subjects respectively and teacher_subject links teachers with the subjects that they currently teach, would I be better off:
    1) implementing three distinct DAO classes i.e. TeacherDAO, SubjectDAO, TeacherSubjectDAO, that correspond to each database table;
    2) implementing a single DAO class that controls access to all three tables, given that business operations often rely on access to all three tables e.g. getSubjectTeachers(Subject s), assignSubjectToTeacher(Subject s, Teacher t), getSubjectsTaughtBy(Teacher t)...
    Thanks
    Ian

    ...would I be better off:Depends on the system.
    If you are always going to have a teacher with subjects then all you need is one class.
    If on the other hand sometimes you are going to have subjects with teachers (given that you have a link table a many to many relationship exists) then two DAOs would exist.
    It would be unlikely for you to have a DAO for the link table unless perhaps you are anticipating a teacher having tens of thousands of subjects or one subject having tens of thousands of teachers.

  • Data Access Object for Data Warehouse?

    Hi,
    Does anyone know how the DAO pattern looks like when it is used for a data warehouse rather than a normal transactional database?
    Normally we have something like CustomerDAO or ProductDAO in the DAO pattern, but for data warehouse applications, JOINs are used and multiple tables are queried, for example, a query may contains data from the Customer, Product and Time table, what should the DAO class be named? CustomerProductTimeDAO?? Any difference in other parts of the pattern?
    Thanks in advance.
    SK

    In my opinion, there are no differences in the Data Access Object design pattern which have any thing to do with any characteristic of its implementation or the storage format of the data the pattern is designed to function with.
    The core pupose of the DAO design pattern is to encapsulate data access code and separate it from the business logic code of the application. A DAO implementation might vary from application to application. The design pattern does not specify any implementation details. A DAO implementation can be applied to group of XML data files, an Excel-based CSV file, a relational database, or an OS file system. The design is the same for all these, it is the implementation that varies.
    The core difference between an operational database and a strategic data warehouse is the purpose of why and how the data is used. It is not so much a technical difference. The relational design may vary however, there may be more tables amd ternary relationships in a data warehouse to support more fine-tuned queries; there may be less tables in a operational database to support insert/add efficiencies.
    The DAO implementation for a data warehouse would be based on the model of the databases. However the tables are set up, that is how the DAO is coded.

  • I just paid my monthly fee but it keeps saying i haven't, so i can't use the apps?? please urgent help...

    i just paid my monthly fee but it keeps saying i haven't, so i can't use the apps?? please urgent help...

    Hi there
    Your Adobe ID is still associated with an older expired membership.  Please sign out of the CC desktop app and sign in again with your Adobe ID to activate the new membership plan.
    Sign out, Sign in | Creative Cloud Desktop app
    Thanks
    Bev

  • What is the use of an access object in a BOL hierarchy ????

    Hi All,
         I want to know what is the use of an access object in BOL hierarchy .... if we can use a search object to search for entities ... then in what scenario will an access object be used ?
    Regards,
    Ashish

    Hi Dominik,
            Thanks for the repy !!!!
    Now, as you said we can access a (deep) node of the whole model using an access object.
    Let us consider the component set ONEORDER. As seen we can use the following path to reach BTDocFlowAll using search object :-
    BTQuery1O -> BTOrder  -> BTOrderHeader  -> BTHeaderDocFlowSet -> BTDocFlowSet -> BTDocFlowAll ....
    Also, to reach BTDocFlowAll we can even use the access object as follows :-
    BTAdminI -> BTItemDocFlowSet  -> BTDocFlowAll....
    Now my question is :-
    Normally we use the class cl_crm_bol_query_service to fire a search based on a search object. Can we use the same class to fire a search based on access object ?
    (actually I currently dont have a CRM system so I could not try it out myself).
    If not, then how do we fire a query using an access object ?
    Regards,
    Ashish

  • Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb objects when you are done with all objects obtained from them

    HI
    i am keep seeing this message in ulsviewer of splogs in a webfront end server
    Detected use of SPRequest for previously closed SPWeb object.  Please close SPWeb objects when you are done with all objects obtained from them, but not before.  Stack trace:  
    at Microsoft.SharePoint.SPWeb.get_Exists()   
    at Microsoft.SharePoint.WebControls.CssLink.OnLoad(EventArgs e)   
    at System.Web.UI.Control.LoadRecursive()   
    at System.Web.UI.Control.LoadRecursive()   
    at System.Web.UI.Control.LoadRecursive()   
    at System.Web.UI.Control.LoadRecursive()   
    at System.Web.UI.Control.LoadRecursive()   
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   
    at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   
    at System.Web.UI.Page.ProcessRequest()   
    at System.Web.UI.Page.ProcessRequest(HttpContext context)   
    at ASP._layouts_icc_icc_scan_view_aspx.ProcessRequest(HttpContext context)   
    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()   
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)   
    at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)   
    at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)   
    at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)   
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)   
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)   
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)   
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
    adil

    Hi,
    Your SPweb object is not disposed properly.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/3a25eb86-8415-4053-b319-9dd84a1fd71f/detected-use-of-sprequest-for-previously-closed-spweb-object-please-close-spweb-objects-when-you?forum=sharepointdevelopmentprevious
    http://sharepoint.stackexchange.com/questions/50793/detected-use-of-sprequest-for-previously-closed-spweb-object-after-spquery
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Accessing object of the main class from the thread

    Hi, I'm having problem accessing object of the main class from the thread. I have only one Thread and I'm calling log.append() from the Thread. Object log is defined and inicialized in the main class like this:
    public Text log;  // Text is SWT component
    log = new Text(...);Here is a Thread code:
    ...while((line = br.readLine())!=null) {
         try {
              log.append(line + "\r\n");
         } catch (SWTException swte) {
              ErrorMsg("SWT error: "+swte.getMessage());
    }Error is: org.eclipse.swt.SWTException: Invalid thread access
    When I replace log.append(...) with System.out.println(..) it works just fine, so my question is do the log.append(..) the right way.

    This is NOT a Java problem but a SWT specific issue.
    It is listed on the SWT FAQ page http://www.eclipse.org/swt/faq.php#uithread
    For more help with this you need to ask your question on a SWT specific forum, there is not a thing in these forums. This advice isn't just about SWT by the way but for all specific API exceptions/problems. You should take those questions to the forum or mailing list for that API. This forum is for general problems and exceptions arising from using the "core" Java libraries.

  • Got error id 502 with photoshop cc 2014 mac V.15.2.2 (15.2.2.310)?? latest version install, please urgent.

    got error id 502 with photoshop cc 2014 mac V.15.2.2 (15.2.2.310)?? latest version install, please urgent.??????
    Process:         Adobe Photoshop CC 2014 [851]
    Path:            /Applications/Adobe Photoshop CC 2014/Adobe Photoshop CC 2014.app/Contents/MacOS/Adobe Photoshop CC 2014
    Identifier:      com.adobe.Photoshop
    Version:         15.2.2 (15.2.2.310)
    Code Type:       X86-64 (Native)
    Parent Process:  launchd [146]
    Responsible:     Adobe Photoshop CC 2014 [851]
    User ID:         502
    Date/Time:       2015-02-06 10:27:25.031 +0400
    OS Version:      Mac OS X 10.9.5 (13F34)
    Report Version:  11
    Anonymous UUID:  817D6DB9-94A0-9F64-CA93-F771A1C7B832
    Crashed Thread:  0 Dispatch queue: com.apple.main-thread
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x00000000000001a0
    VM Regions Near 0x1a0:
    -->
    __TEXT                 0000000104662000-0000000108f3f000 [ 72.9M] r-x/rwx SM=COW  /Applications/Adobe Photoshop CC 2014/Adobe Photoshop CC 2014.app/Contents/MacOS/Adobe Photoshop CC 2014

    got error id 502 with photoshop cc 2014 mac V.15.2.2 (15.2.2.310)?? latest version install, please urgent.??????
    Process:         Adobe Photoshop CC 2014 [851]
    Path:            /Applications/Adobe Photoshop CC 2014/Adobe Photoshop CC 2014.app/Contents/MacOS/Adobe Photoshop CC 2014
    Identifier:      com.adobe.Photoshop
    Version:         15.2.2 (15.2.2.310)
    Code Type:       X86-64 (Native)
    Parent Process:  launchd [146]
    Responsible:     Adobe Photoshop CC 2014 [851]
    User ID:         502
    Date/Time:       2015-02-06 10:27:25.031 +0400
    OS Version:      Mac OS X 10.9.5 (13F34)
    Report Version:  11
    Anonymous UUID:  817D6DB9-94A0-9F64-CA93-F771A1C7B832
    Crashed Thread:  0 Dispatch queue: com.apple.main-thread
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x00000000000001a0
    VM Regions Near 0x1a0:
    -->
    __TEXT                 0000000104662000-0000000108f3f000 [ 72.9M] r-x/rwx SM=COW  /Applications/Adobe Photoshop CC 2014/Adobe Photoshop CC 2014.app/Contents/MacOS/Adobe Photoshop CC 2014

Maybe you are looking for

  • Editing timelapses in Lightroom- looks very different if there´s a small change within the frame

    Hi We´re having some serious issues with editing timelapses in Lightroom (5.6). What seems to happen over and over again, is that if there´s a small change within the frame (such as a bird flying past, people walking), the editing result varies great

  • How do we determine the db writer process

    Hi How can we determine that number of DB WRITER process required for the database. At what basis we set the db writer process in a database. Can any one please explain in detail ?. Thanks in advance. Govind

  • Entitlement on book not working correctly

    Hi, This is a werid problem. We are using weblogic 8.1 with SP3. We have created a role and assigned it to a portal Book so that only user in the role can see that book. When we login as a user who is in that role, we did not see the book. But when I

  • Hpc310 stopped updating at 2of2 with 1 sec left

    my hp c310 printer would only print very lightly , i cleaned then vents on cartridges and tried to update on web and it stopped  at 2 of 2 with one second left.

  • Diff bet XI3.0 and 3.1

    Hi, What are the differences/enhancements in XI3.1? whata re the major differences between 3. an 3.1? Thank you, Kris