Ahmed Shehata

Greenhorn
+ Follow
since Oct 24, 2018
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ahmed Shehata

I have downloaded the following Class from the net, its just displaying a progressbar while a task is running, I need to dispose the whole Class when the task is finished automatically?, this code is downloaded from a Demo website and mostly the programmer decide the way his application runs, and I do see so many applications which displays a progressBar while something is running and then it disappears automatically, and adding dispose() after line 53 does not help, it disposes the JFrame immediately!!
2 months ago
I have a piece of java code which is displaying a progress bar when some procedure is going on (writing some data to DB ) in a thread
problem is when  i do use GUI with this logic  i discover that some records are not written to DB and when I use this piece of code without the GUI its working fine.
Can not figure out where is the problem.

  Thread PrcessReceiptsThread = new Thread() {
                public void run() {
                   JFrame frame = new JFrame("Process");
                   JLabel label = new JLabel("Please wait...");
                   JProgressBar pb = new JProgressBar();
                   pb.setIndeterminate(true);
                   pb.setBackground(new java.awt.Color(248, 201, 171));
                 
                   frame.setBackground(new java.awt.Color(242, 186, 152));
                   frame.setSize(400, 200);
                   frame.setLocationRelativeTo(null);
         
                   JPanel panel = new JPanel();
                   panel.setBackground(new java.awt.Color(242, 186, 152));
                   panel.setLayout(null);
         
                   label.setBounds(100, 30, 250, 10);
                   pb.setBounds(100, 50, 200, 20);
         
                   panel.add(label);
         
                   panel.add(pb);
                   frame.add(panel);
                   frame.setVisible(true);
                 
                   writeToDB();
                   
                   frame.setVisible(false);
               }
       };PrcessReceiptsThread.start();
2 months ago
Hello,
I am trying to print a report created with Jasper Reports from under Netbeans 8.2, the first report it worked fine for couple of days then it sopped working and an
error message "Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester".
all Jasperreports Jar files do exist in my project under the Directory "Libraries".
here is the code I use to call Jasper report from my aapplication.

8 months ago