Wait for Renderers to Display

I'm testing a component with an editable DataGrid with custom item renderers. I wanted to use a sequence to simulate the user modifying a cell in the datagrid, but to be able to do that, I have to first make sure all the visible renders have been added and drawn. I've tried waiting for creationComplete and show but both of those events can potentially be dispatched before the renderers are added. Is there any event I can listen for in my test that will guarantee all the renderers have been drawn and displayed for the visible section of the datagrid?

Yes, but if you combine that with other methods you can get where you need to go.
var renderer:IListItemRenderer = dataGrid.itemToItemRenderer ( dataObjectToFind );
if(renderer)
     var rowIndex:int = dataGrid.itemRendererToIndex( renderer );
     var colIndex:int = columnDataFieldToIndex( dataFieldToFind );
     // index null checks..
     dataGrid.editedItemPosition = {columnIndex: colIndex, rowIndex: rowIndex };
Here is a example method for finding your column index for a datafield.
public function columnDataFieldToIndex ( dataField:String ) : int
     var colIndex : int;
     for each (var column:AdvancedDataGridColumn in columns)
          if(column.dataField == dataField)
               colIndex = columns.indexOf( column );
               break;
     return colIndex;
Hope that helps.

Similar Messages

  • Created a Document : Waiting for moderation - Status display will be a good addition

    Hi SCN Support Community,
         i had created a document a week ago, Since this is my first attempt to give back to the community , I am very impatient about when this will be published ( as its under moderation). I understand from the FAQs of Pre-moderation section that we have volunteers to moderate content and it takes roughly 3 days. I also understand that there is no way to check the status of my document till i get the relevant notification. However i feel it will be really helpful if we have in the portal where we can atleast see the status ..doesnt matter if it says "Under- Moderation" (there might be a reason why scn has opted away from this , if there isnt any, why not .
    Thanks & Regards,
    Tashi

    Hi Tashi Norbu,
    Your document is released now. Thanks for sharing your experience with a good document.
    Here is your document WebDynpro ALV: Editable ALV using Property Binding(Without dedicated boolean attributes)
    Keep participating in SCN.

  • I am thinking of getting my first Macbook pro for uni and was just wondering which one would be the best? The macbook pro or macbook pro with retina display? or even wait for the new release in 2013 ?

    I am thinking of getting my first Macbook pro for uni and was just wondering which one would be the best? The macbook pro or macbook pro with retina display? or even wait for the new release in 2013 ?

    If your budget is unlimited, look at both the retina and non-retina and make a decision based on your preferences.  If funds are tight, explore the options in the refurbished section.  Unless you are dealing with courses that demand specific performance parameters, any one of these options will suffice.
    Ciao.

  • Getting a JFrame to display  from a JSP, remaining JSP code waits for frame

    Hello,
    I'm new to Java and just started using JSPs. My objective is to call a display window (from a JSP) that shows the user a list of project selections. Once the user has made their selections and clicked a Submit button, the display class captures the selected projects to the request object as an attribute and then closes the window. The next command in the jsp then forwards the request attribute to a controller. I'm having trouble getting the display window to show-the JSP seems to hang and then timeout. Is there code I'm missing to get the JSP to stop processing while it waits for the choices to be made in the JFrame?
    Below is the JSP code and the class I'm calling. I'm seeing all my debug System.out statements but no JFrame pops up. In the JFrame class, the line f.addWindowListener(... does the capture of user selections to the request attribute.
    Any help will be greatly appreciated!!
    JSP:
    <%@ page language="java" contentType="text/html;charset=UTF-8" import="com.plumtree.remote.portlet.*,edu.app.projects.*" %>
    <%
        request.setAttribute("action", "prefDisplay");
        request.setAttribute("orderby", "title");
        ServletContext jc = getServletContext();
        DualListBox dual = new DualListBox(request,(String)jc.getAttribute("db.driver"), (String)jc.getAttribute("db.connectionstring"),"title");
         JFrame f = dual.getFrame();
         f.setVisible(true);//expect code to stop here and display frame, waiting for the user to finish.
            //Debug code that tests if frame is visible at this point -came true though did not see Jframe displayed
         if(f.isShowing()){
         System.out.println("Jframe visible");}
           //Send to ProjectsController
          request.getRequestDispatcher("pc").forward(request, response);%>               ---------------------------------------------------------------------------------------------
    JFrame Class (below)
    -Sets up Frame and corresponding Dialog box
    -Populates Dialog box with options from a database call (for user selection)
    -Should wait for user input - Window close or Submit! to capture selection and dispose of Jframe
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.EventQueue;
    import java.awt.Frame;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.Insets;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowEvent;
    import java.lang.reflect.InvocationTargetException;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Collection;
    import java.util.Iterator;
    import java.util.SortedSet;
    import java.util.TreeSet;
    import javax.servlet.http.HttpServletRequest;
    import javax.swing.AbstractListModel;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JList;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.ListCellRenderer;
    import javax.swing.ListModel;
    public class DualListBox extends JPanel {
      private static final long serialVersionUID = 1L;
      private static final Insets EMPTY_INSETS = new Insets(0, 0, 0, 0);
      private static final String ADD_BUTTON_LABEL = "Add >>";
      private static final String REMOVE_BUTTON_LABEL = "<< Remove";
      private static final String DONE_BUTTON_LABEL = "Submit!";
      private static final String DEFAULT_SOURCE_CHOICE_LABEL = "Available Projects";
      private static final String DEFAULT_DEST_CHOICE_LABEL = "Your Selections";
      private String orderby, mydriver, connectionString;
      private JLabel sourceLabel;
      private JList sourceList;
      private SortedListModel sourceListModel;
      private JList destList;
      private String chosenprojects;
      private SortedListModel destListModel;
      private JLabel destLabel;
      private JButton addButton;
      private JButton removeButton;
      private JButton doneButton;
      private DatabaseHelper dh;
      protected HttpServletRequest request;
      protected JFrame f;
      protected JDialog jd;
      public DualListBox(HttpServletRequest req, String driver, String connection, String ordering) {
         System.out.println("In DualList Setup");
        request =req;
         orderby =ordering;
         connectionString = connection;
         mydriver = driver;
         f = new JFrame("Projects List Selector");     
         jd =new JDialog(f,true);
         jd.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
         System.out.println("B4 initscreen");
        initScreen();
        System.out.println("After initscreen");
        String[] DBprojects = this.dbCall();
        System.out.println("After DB Call");
        this.addSourceElements( DBprojects );   
        System.out.println("Filled screen");
        jd.getContentPane().add(this, BorderLayout.CENTER);
        //f.getContentPane().add(jd, BorderLayout.CENTER);
        jd.setSize(800, 600);
        System.out.println("OK2");
        jd.setVisible(true);
        System.out.println("OK3");
        Runnable runner = new FrameShower(jd);
        EventQueue.invokeLater(runner);
      public String getSourceChoicesTitle() {
        return sourceLabel.getText();
      public String chosenprojects() {
             return chosenprojects;
      public JFrame getFrame() {
             return f;
      public void setSourceChoicesTitle(String newValue) {
        sourceLabel.setText(newValue);
      public String getDestinationChoicesTitle() {
        return destLabel.getText();
      public void setDestinationChoicesTitle(String newValue) {
        destLabel.setText(newValue);
      public void clearSourceListModel() {
        sourceListModel.clear();
      public void clearDestinationListModel() {
        destListModel.clear();
      public void addSourceElements(ListModel newValue) {
        fillListModel(sourceListModel, newValue);
      public void setSourceElements(ListModel newValue) {
        clearSourceListModel();
        addSourceElements(newValue);
      public void addDestinationElements(ListModel newValue) {
        fillListModel(destListModel, newValue);
      private String[] dbCall(){
             if(dh==null)
                  dh = new DatabaseHelper(mydriver, connectionString);
              PreparedStatement ps = null;
              ResultSet rs = null;
              ArrayList<String>children = new ArrayList<String>();
              ArrayList<String[]>tree =new ArrayList<String[]>();
              if(orderby==null || orderby.equals("")){
                   orderby ="region";
              String query = "select title,id from projects";// order by " + orderby;
              System.out.println(query);
              try {
                   Connection conn =dh.getConnection();
                   ps = conn.prepareStatement(query);
                   rs = ps.executeQuery();
                   while (rs.next()) {
                        children.add(new String(rs.getString(1)));
                        System.out.println(rs.getString(1));
                        tree.add(new String[]{rs.getString(1),rs.getString(2)});
                   request.setAttribute("ResultTree",tree);
                   return (String[])children.toArray(new String[children.size()]);
              } catch (SQLException e) {
                   throw new RuntimeException(e);
              } finally {
                   try {
                        if (null != rs) rs.close();
                   } catch (SQLException e) {
                   try {
                        if (null != ps) ps.close();
                   } catch (SQLException e) {
      private void fillListModel(SortedListModel model, ListModel newValues) {
        int size = newValues.getSize();
        for (int i = 0; i < size; i++) {
          model.add(newValues.getElementAt(i));
      public void addSourceElements(Object newValue[]) {
        fillListModel(sourceListModel, newValue);
      public void setSourceElements(Object newValue[]) {
        clearSourceListModel();
        addSourceElements(newValue);
      public void addDestinationElements(Object newValue[]) {
        fillListModel(destListModel, newValue);
      private void fillListModel(SortedListModel model, Object newValues[]) {
        model.addAll(newValues);
      public Iterator sourceIterator() {
        return sourceListModel.iterator();
      public Iterator destinationIterator() {
        return destListModel.iterator();
      public void setSourceCellRenderer(ListCellRenderer newValue) {
        sourceList.setCellRenderer(newValue);
      public ListCellRenderer getSourceCellRenderer() {
        return sourceList.getCellRenderer();
      public void setDestinationCellRenderer(ListCellRenderer newValue) {
        destList.setCellRenderer(newValue);
      public ListCellRenderer getDestinationCellRenderer() {
        return destList.getCellRenderer();
      public void setVisibleRowCount(int newValue) {
        sourceList.setVisibleRowCount(newValue);
        destList.setVisibleRowCount(newValue);
      public int getVisibleRowCount() {
        return sourceList.getVisibleRowCount();
      public void setSelectionBackground(Color newValue) {
        sourceList.setSelectionBackground(newValue);
        destList.setSelectionBackground(newValue);
      public Color getSelectionBackground() {
        return sourceList.getSelectionBackground();
      public void setSelectionForeground(Color newValue) {
        sourceList.setSelectionForeground(newValue);
        destList.setSelectionForeground(newValue);
      public Color getSelectionForeground() {
        return sourceList.getSelectionForeground();
      public String getProjects(){
           return chosenprojects;
      private void clearSourceSelected() {
        Object selected[] = sourceList.getSelectedValues();
        for (int i = selected.length - 1; i >= 0; --i) {
          sourceListModel.removeElement(selected);
    sourceList.getSelectionModel().clearSelection();
    private void clearDestinationSelected() {
    Object selected[] = destList.getSelectedValues();
    for (int i = selected.length - 1; i >= 0; --i) {
    destListModel.removeElement(selected[i]);
    destList.getSelectionModel().clearSelection();
    private void initScreen() {
    setBorder(BorderFactory.createEtchedBorder());
    setLayout(new GridBagLayout());
    sourceLabel = new JLabel(DEFAULT_SOURCE_CHOICE_LABEL);
    sourceListModel = new SortedListModel();
    sourceList = new JList(sourceListModel);
    add(sourceLabel, new GridBagConstraints(0, 0, 1, 1, 0, 0,
    GridBagConstraints.CENTER, GridBagConstraints.NONE,
    EMPTY_INSETS, 0, 0));
    add(new JScrollPane(sourceList), new GridBagConstraints(0, 1, 1, 5, .5,
    1, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
    EMPTY_INSETS, 0, 0));
    addButton = new JButton(ADD_BUTTON_LABEL);
    add(addButton, new GridBagConstraints(1, 2, 1, 2, 0, .25,
    GridBagConstraints.CENTER, GridBagConstraints.NONE,
    EMPTY_INSETS, 0, 0));
    addButton.addActionListener(new AddListener());
    removeButton = new JButton(REMOVE_BUTTON_LABEL);
    add(removeButton, new GridBagConstraints(1, 4, 1, 2, 0, .25,
    GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
    0, 5, 0, 5), 0, 0));
    removeButton.addActionListener(new RemoveListener());
    doneButton = new JButton(DONE_BUTTON_LABEL);
    add(doneButton, new GridBagConstraints(1, 6, 1, 2, 0, .25,
    GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
    0, 10, 0, 10), 0, 0));
    doneButton.addActionListener(new DoneListener());
    f.addWindowListener(new java.awt.event.WindowAdapter() {
         public void windowClosing(WindowEvent winEvt) {
              //could set to null here to force use of Done button only
         chosenprojects = destList.getSelectedValues().toString();
              request.setAttribute("ProjectIDs", destList.getSelectedValues().toString());
              System.exit(0);
    destLabel = new JLabel(DEFAULT_DEST_CHOICE_LABEL);
    destListModel = new SortedListModel();
    destList = new JList(destListModel);
    add(destLabel, new GridBagConstraints(2, 0, 1, 1, 0, 0,
    GridBagConstraints.CENTER, GridBagConstraints.NONE,
    EMPTY_INSETS, 0, 0));
    add(new JScrollPane(destList), new GridBagConstraints(2, 1, 1, 5, .5,
    1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
    EMPTY_INSETS, 0, 0));
    private class AddListener implements ActionListener {
    public void actionPerformed(ActionEvent e) {
    Object selected[] = sourceList.getSelectedValues();
    addDestinationElements(selected);
    clearSourceSelected();
    private class RemoveListener implements ActionListener {
    public void actionPerformed(ActionEvent e) {
    Object selected[] = destList.getSelectedValues();
    addSourceElements(selected);
    clearDestinationSelected();
    private class DoneListener implements ActionListener {
         public void actionPerformed(ActionEvent e) {
         chosenprojects = destList.getSelectedValues().toString();
         request.setAttribute("ProjectIDs", destList.getSelectedValues().toString());
         System.exit(0);      
    class FrameShower implements Runnable {
         final JDialog frame;
         public FrameShower(JDialog frame) {
              this.frame = frame;
         public void run() {
              System.out.println("B4 make visible");
              frame.setVisible(true);          
         System.out.println("Made screen visible");
    class SortedListModel extends AbstractListModel {
    private static final long serialVersionUID = 8777627817685130496L;
    SortedSet model;
    public SortedListModel() {
    model = new TreeSet();
    public int getSize() {
    return model.size();
    public Object getElementAt(int index) {
    return model.toArray()[index];
    public void add(Object element) {
    if (model.add(element)) {
    fireContentsChanged(this, 0, getSize());
    public void addAll(Object elements[]) {
    Collection c = Arrays.asList(elements);
    model.addAll(c);
    fireContentsChanged(this, 0, getSize());
    public void clear() {
    model.clear();
    fireContentsChanged(this, 0, getSize());
    public boolean contains(Object element) {
    return model.contains(element);
    public Object firstElement() {
    return model.first();
    public Iterator iterator() {
    return model.iterator();
    public Object lastElement() {
    return model.last();
    public boolean removeElement(Object element) {
    boolean removed = model.remove(element);
    if (removed) {
    fireContentsChanged(this, 0, getSize());
    return removed;
    }{code}
    Edited by: redm14A on Oct 10, 2007 11:34 AM
    Edited by: redm14A on Oct 10, 2007 11:37 AM
    Edited by: redm14A on Oct 10, 2007 11:40 AM
    Edited by: redm14A on Oct 10, 2007 11:45 AM
    Edited by: redm14A on Oct 10, 2007 11:47 AM

    redm14A wrote:
    Hmm, I was trying to avoid writing an applet. Seems my only other option then is to write a JSP that returns a javascript menu populated by options from a database call. Then I'd have the user click submit to send the options to another JSP that simply sets the request attribute and forwards to the controller. Will this be a sound alternative?
    Edited by: redm14A on Oct 10, 2007 12:29 PMSounds good to me.

  • Display a message without waiting for user response

    Hi,
    I'm currently trying to find the best way to display a message, and multiple messages to the user, so that he is informed of the processing.
    I've tryied the dialog box but it's waiting for user confirmation so it interrupts the execution of the VI.
    Another precision is that I call the dialog in a case structure, so does it act?
    I'm thinking about using a VI dedicated to the displaying of the message but I may not be able to display multiple message boxes.
    Can anyone help me to use the best way?
    Thank you in advance.
    Bim

    You can build the message display into your vi by using the techniques shown in the attached vi (LV7.1.1)
    It is just a string indicator with large font size, and using property nodes to show/hide when necessary.
    - tbob
    Inventor of the WORM Global
    Attachments:
    MessageDisplay.vi ‏31 KB

  • TS1702 Has anyone else had this problem? Been waiting for 2 days for an app from apple store to install on my iPad. It just keeps saying "installing" have tried to update other apps at the same time and that happens is the app icons continue to display "w

    I have been waiting for two days for an app to install on my iPad. Seems like something is stuck as it just keeps displaying "installing". Can not see where I can delete and start over and it's preventing me from updating or downloading any more games. Acts like a corrupt file or something. Can anyone help solve this problem? Thanks

    Did anyone ever suggest you reset your PRAM?
    http://docs.info.apple.com/article.html?artnum=2238
    Also might want to try resetting the SMC, although I
    doubt there's an issue there.
    http://docs.info.apple.com/article.html?artnum=304123
    I'm getting tired of people who supposedly know what
    they're doing simply guessing that resinstalling the
    OS might solve the issue. It's like trying to dissect
    a frog with a sledge hammer, and wondering why you
    didn't learn anything about anatomy in the process.
    These sorts of things, although bizarre, should be
    (and probably are) fixable without major surgery.
    Thanks for the suggestion... but I think my first question would be why these parameters would need re-setting? This is a new machine... It has never been shut down hard. It is used at most 10 hours per week... mostly using Office 2004 for MAC. I need to figure this out as I will soon need it as a Cs2/CS3 - Aperture workhorse.
    I too agree that it is best not to use a sledge when a scalpel is needed... but as a novice to the MAC world I may have been misled by Apple support. I seems to have fixed the symptoms ( some) but appears NOT to have addressed the cause... which is what I am after.
    Would TechTool Pro detect a bad HD or RAM?
    Thanks....

  • I WANT TO BUY A MAC BOOK PRO. MUST I WAIT FOR THE ONE WITH RETINA DISPLAY. WILL THE FACT THAT THERE IS NO CD ROAM BE A PROBLEM. CAN YOU USE A EXSTERNAL CD ROAM ON A MAC?

    I WANT TO BUY A MAC BOOK PRO. MUST I WAIT FOR THE ONE WITH RETINA DISPLAY. WILL THE FACT THAT THERE IS NO CD ROAM BE A PROBLEM? CAN YOU USE AN EXSTERNAL CD ROAM WITH A MAC?

    Apple will gladly sell you a color coordinated and texture matching external SuperDrive to go with your Retina'ized MBP for about $80 bucks.
    Note that those models are completely sealed with no serviceable or upgradeable parts inside. So if you decide to bite the bullet, be sure to customize its guts to your heart's content from the get-go as no further change will be possible. This means CPU speed, amount of RAM and size of the solid state drive. Other external options, like the Superdrive, can be added later.

  • PS has given up waiting for an assessment of the graphics display driver?

    I replaced my graphics card because it was not supported and  some PS CC graphics functionality (smart sharpening, etc) wouldnot operate. I purchased and installed a new Gigabyte AMD HD7770 as per the list of supported cards. The latest drivers have been installed. (Windows 7 64bit)
    I am now getting a message "PS has given up waiting for an assessment of the graphics display driver. Enhancements that use the graphics hardware have been disabled. Check the manufacturer's website site for the latest software."
    What is happening? Why am I paying for features that I cannot access despite having gone to the expense of purchasing a new card and following the PS CC requirements to the letter?
    This is very frustrating and annoying.
    Addendum: I am now getting a message that 3D requires a minimium of 512Mb of vRAM. However, my new card is 1 GB......?????????
    Can someone provide a solution for this problem please?

    The best thing to do is to go into Help > System Info, copy and paste the contents into your reply.
    One of us or several should be able to sort it out for you.
    Gene

  • When open photoshop a message came up saying photoshop has given up waiting for assesment of the display driver. enhancements that use the graphics hardware have been disabled... can anyone help?

    when open photoshop a message came up saying photoshop has given up waiting for assesment of the display driver. enhancements that use the graphics hardware have been disabled... can anyone help?

    The best thing to do is to go into Help > System Info, copy and paste the contents into your reply.
    One of us or several should be able to sort it out for you.
    Gene

  • Itune display "is waiting for the application to change the content"

    I don't now why my itune display "is waiting for the application to change the content"??

    See:
    iOS: Troubleshooting applications purchased from the App Store
    Contact the developer/go to their support site
    Restore from backup. See:
    iOS: How to back up
    Restore to factory settings/new iPod

  • HT201210 Synching iPhone after factory restore and restore from backup; synching appears stuck on Step 5 of 5, "waiting for items to copy."  That message displays for hours with no apparent progress.

    Synching iPhone after factory restore and restore from backup; synching appears stuck on Step 5 of 5, "waiting for items to copy."  That message displays for hours with no apparent progress.

    I never had this problem, but just noticed it happening.. Please note it's a BUG. I went out and bought a 128GB  iPhone just to hold all my songs. It wouldn't work. This never happened with the iPhone 3/3s/4/5/5s but started happening with the iPhone 6. After 40 hours of working through all possible solutions on the web and with Apple cares support (supposedly senior level) They finally suggested what the problem was. I had "Convert higher bit songs to 128  aac" Checked. This does not work One more thing when I unchecked that, the sync took like 3.5 hours instead of the 9-12 hours is usually took even on the smaller iphones. I have 98.7GB of music. Before I was just syncing a list of specific songs.
    The syncing seems to be random when it has the problem though.

  • 15" Retina Display MBP or wait for the 13"?

    I'm upgrading from my current HP laptop which is about 4 years old now and is as slow as a laptop gets. I don't know whether to get the current 15" retina display MPB or wait for the 13" to be released and get that since i'm only a 10th grade student and the portability and size may be more convenient but i'm not sure if the 13" would be too small or the 15" would be too big. A teacher at my school has a 13" and from what i've seen, it doesn't look as big as i'd want my personal laptop to be but at the same time, the 15" looks too big in the videos i've watched. Please help!

    If you really want to hear some screams and howls about how unusable Photoshop is with the rMBP, visit the Photoshop users forum... you'll get an earful!
    Although Adobe showed a Retina version of PS in June at the WWDC where the rMBP was announced, they've issued no statements as to whether - or when - it's going to go 'live'. Most heavy-duty PS user are using eternal monitors anyway so it doesn't affect them too much - just that they don't have a portable machine to edit photos.
    But, as I said, Apple apps look great - if you can get by using only Apple apps, then the rMBP is a winner. If you're going to use third-party apps, however, it's just not ready for prime time.
    Clinton

  • When I try to sync my ipod touch, itunes v11, displays waiting for sync to start, then a meesage appears saying sync failes as device timed out.

    when i try to sync my ipod, itunes v11 says "waiting for sync to start" then a message appears "sync failed, device timed out.

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?

  • How to do custom dialog so it displays the dialog and waits for user to end

    I have an application that I want to create my own dialog screens. For example, the user cliks on one frame, and I want to open a window for the user to enter data, after the user finishes, he presses OK and then the main app continues.
    On the class that I open the dialog, I open it with:
    NewOkCancelDialog.abrePopup();
    System.out.println("Program should wait for the dialog to close");And the 'NewOkCancelDialog' class is defined like:
    public class NewOkCancelDialog extends javax.swing.JDialog {
    The constructor is like:
    public NewOkCancelDialog(java.awt.Frame parent, boolean modal) {
    super(parent, true);
    initComponents();
    this.setLocation(400,400);
    This methods are when the user activates the button and the popup closes..
    private void cierraPopupOk(){
    resultados.setciudad1(this.fld_ciudad1.getText());
    if (resultados.getciudad1length() < 3) {
    System.out.println("Error en la entrada!");
    } else {
    doClose(RET_OK);
    private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {                                        
    cierraPopupOk();
    private void doClose(int retStatus) {
    returnStatus = retStatus;
    this.estaAbierto = false;
    setVisible(false);
    dispose();
    I would like to have the application in the first lines, after calling
    NewOkCancelDialog.abrePopup();
    to wait until the method doClose() in NewOkCancelDialog class is finnished. But right now, after the ...abrePopup() is called, it continues.
    What am I doing wrong? or what am I not doing?

    Use the "code" tags not the "bold" tags when posting code.
    But right now, after the ...abrePopup() is called, it continues.Well your posted code doesn't show this method so we don't know what you are doing in this method.
    Why are you using a static method to show the dialog? Normally the code would be:
    JDialog dialog = new CustomDialog();
    dialog.setVisible( true );
    But you are correct with the basic idea in that you need to use a modal dialog.

  • My thunderbird suddenly stops working when I do any action and displays (Not Responding) but when I wait for a minute or two works but does it again when I pres

    When I start up everything looks normal but when I choose an email to read, the loading green wheel comes out and takes a long time. If I try to press anything the (Not Responding) shows up on the tab above. When I wait for a minute or two, it works back without the green wheel but when I choose an email again, the Not Responding message comes out again. I"ve tried the compacting, safe mode , plug-in disabled. But still happens everytime.

    I think you will find the issue is your anti virus. But for a quick and dirty try simply compact your folders from the File menu (alt+F).
    That may help if there is space to be recovered and provide temporary relief..
    Restart the operating system in '''[http://en.wikipedia.org/wiki/Safe_mode safe mode with Networking]'''. This loads only the very basics needed to start your computer while enabling an Internet connection. Click on your operating system for instructions on how to start in safe mode: [http://windows.microsoft.com/en-us/windows-8/windows-startup-settings-including-safe-mode Windows 8], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-7 Windows 7], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-vista Windows Vista], [http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/boot_failsafe.mspx?mfr=true" Windows XP], [http://support.apple.com/kb/ht1564 OSX]
    ; If safe mode for the operating system fixes the issue, there's other software in your computer that's causing problems. Possibilities include but not limited to: AV scanning, virus/malware, background downloads such as program updates.

Maybe you are looking for

  • Help with adding image onclick

    Hey everyone, I am making a simple game in AS3 and need help with adding an image once they have click on something. On the left of the screen are sentences and on the right an image of a form. When they click each sentence on the left, writing appea

  • Purchased videos do not play back in iTunes

    When I try to play purchased (protected) content in iTunes 11.0.2 on my Macbook Pro, I get no video or audio playback, only a black screen.  The time counter progresses, as though the video is playing.  If the same content is streamed to my Apple TV

  • HTML page generated by Netweaver studio is very big

    Hi, Is there any way to make the generated HTML pages (when developing a web dynpro application from Netweaver studio) smaller in size  ? It appears to be big even for a very simple hello world page. Thanks. Regards, Daniel

  • Safari's zooming behavior

    Safari's zooming behavior changed between Snow Leopard and Mtn Lion. Whereas zooming used to leave the width fixed, reflowing the text, it now seems to scale the width and text together, causing text to scroll out of view. How do I get the old behavi

  • JTable scroll

    how can I programatically scroll a JTable? thanks.