Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7612573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:56:50+00:00 2026-05-31T01:56:50+00:00

i use DynamicReports library for make reports for my app. Createing report takes some

  • 0

i use DynamicReports library for make reports for my app. Createing report takes some time and i decided create custom progress bar while reports has not been created. Question after code examples.

progress bar class:

public class ProgressDialog implements DialogWrapper{

    private JFrame iFrame;
    private JDialog iDialog;
    private JPanel pane;
    private final JProgressBar aJProgressBar = new JProgressBar(0, 100);

    public ProgressDialog(){
        onCreate();
    }

    @Override
    public void onCreate() {
        iFrame = new JFrame("Создание отчета");
        iDialog = new JDialog(iFrame, true);
        pane = new JPanel();
        aJProgressBar.setIndeterminate(true);
        pane.add(aJProgressBar, BorderLayout.NORTH);
        iDialog.add(pane, BorderLayout.CENTER);
        iDialog.setTitle("Создание отчета");
        iDialog.setSize(300, 150);
        iDialog.setResizable(false);
        iDialog.setVisible(true);
        return;
    }

    @Override
    public void fillData() {}

    @Override
    public void onSubmit() {}

    protected void onCancel(){
        iDialog.setVisible(false);
        iDialog.dispose();
    }

    public void cancel(){
        onCancel();
    }
 }

Report abstract class

public abstract class AbstractReportMain<T extends ReportDesign<U>, U extends ReportData> {
private ProgressDialog pd;

public AbstractReportMain() {
    pd = new ProgressDialog();
    build();
}

protected void build() {
    try {
        JasperReportBuilder reportBuilder = DynamicReports.report();            
        U data = getReportData();
        if (data != null) {
            reportBuilder.setDataSource(data.createDataSource());
        }
        getReportDesign().configureReport(reportBuilder, data);

        pd.cancel();
        reportBuilder.show(false);
    } catch (DRException e) {
        e.printStackTrace();    
    }
}

protected U getReportData() {
    return null;
}

protected abstract T getReportDesign(); 
}

Question: when i create ProgressDialog, program flow stops while i do not close dialog. Why it’s happen, how this behaviour called and where i can read about it? How it use and маке it work for me. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T01:56:52+00:00Added an answer on May 31, 2026 at 1:56 am

    I believe your problem is that you are not creating a new thread for your progress dialog. Here is an example that will help you. Modal Progress Dialog example

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

use this website a lot but first time posting. My program creates a number
Use case: I've just entered insert mode, and typed some text. Now I want
Use case: Wanna insert custom annotation to fields in java class generated by JAXB
Use case: User launches app The user enters google password The app lets the
use pthread_create to create limited number of threads running concurrently Successfully compile and run
Use Eclipse Classic with ADT plugin. Tried to make project from existing example of
use strict; use Time::HiRes qw[gettimeofday tv_interval]; my $start_index = int(rand(50))+100;#this value is arbitrary for
is it possible to print some custom text after the title (and subtitle) using
Use to work with a MySQL + + (library for C + +) The
USE Pooja GO ----Create TestTable CREATE TABLE TestTable(RtJobCode VARCHAR(20), RtProfCode smallint,RtTestCode smallint,ProfCode smallint,TestCode smallint)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.