SourceForge has been redesigned. Learn more.

Need Help to reload right data in EditFrame

  • Mieczyslaw Zamroz

    Need help:

    I have gridFrame with any important data of rows.
    To insert new data I am using EditFrame as OS stanadards.
    In my Insert operation, I do same calculate process in Data Base and this new data i should show in EditFrame.

    When inserting new record in  grid.getSelectedRow is 0 (first row)
    new data is inserting as new record in DataBase and in GridFrame as new row.

    When i execute reloadData in EditFrame Controler to load stored in DataBase data. EditFram is loading rowNum = 0 from GridFram and not new inserted record.

    When I do not execute (as mentioned above)
    editFrame.getMainPanel().reload() in afterInsertData()
    and pressing RELOAD BUTTON data is refreshed correctly.

    In wich way can I obtein this result automatically. without user interaction.

    Grateful for suggestions how to sole my problem or am I doing wrong directions

    Best Greetings for all

  • Mieczyslaw Zamroz

    Problem solved,
    A suppose there are more then this way to solve isse.

    Is this right way? i don't know… but work….

    I was applay this code:

    public void afterInsertData() {
    SwingUtilities.invokeLater(new Runnable(){
        public void run() {

    Merry Christmas
    Wesolych Swiat Bozego Narodzenia


Log in to post a comment.