-
Need Help:Problem while closing Jasper Viewer
Hi,
I am using the Jasper Report for preparing reports. I am developing application in Swing. I write the program for creating the report in Jasper Viewer. And I called that class by creating object in the main program. Everything is working fine and the Report is generated in the Jasper viewer as expected.
But the Problem is When I close that Jasper Viewer window then total application is getting closed. I don't know how to solve this problem. So please help me in this regard. Now i am in Project Deadline.
Thanks,
Sathy,
EMail Address Removed By Mod
Last edited by Hack; 01-18-2008 at 07:48 AM.
-
when you'll declare the JasperViewer object, pass to parameter false, like this:
JasperViewer visor = new JasperViewer(jp,false) ;
visor.setVisible(true) ;
The parameter 'false', is the boolean to close all application or not.
-
 Originally Posted by gamopu
when you'll declare the JasperViewer object, pass to parameter false, like this:
JasperViewer visor = new JasperViewer(jp,false) ;
visor.setVisible(true) ;
The parameter 'false', is the boolean to close all application or not.
please give complete code plz plz plz
try to send to email Email Address Removed By Mode
Last edited by Hack; 09-17-2009 at 12:40 PM.
Reason: Removed EMail Address
-
Sathy,
I have edited your post and removed your email address.
You should never post your email address in an open post on an open forum. Mail spam bots can pick that up and before you know it, your mailbox is full of junk mail. If you wish to share your email address with other forum members, please do so via our PM system.
In addition, we prefer all answers to questions be publically posted rather than sent via EMail or PM. That way, everyone with a similar problem can benefit.
Thanks.
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
-
i need help find error in my coding and its due in an hour can someone please help.
Code:
import java.text.DecimalFormat;
/**
Employee superclass and ProductionWorker
subclass.
*/
/**
Chapter 11
Programming Challenge 1, Employee and
ProductionWorker Class Demo Program
*/
public class WorkerDemo
{
public class Employee extends ProductionWorker
{
private String employeeName;
private int employeeNumber;
private double hireDate;
public Employee(String name, int num, double date);
{
employeeName = name;
employeeNumber = num;
hireDate = date;
}
public void setName(String name)
{
employeeName = name;
}
public void setNum(int num)
{
employeeNumber = num;
}
public void setDate(double date)
{
hireDate = date;
}
public String getName()
{
return employeeName;
}
public String getNum()
{
return employeeNumber;
}
public String getDate()
{
return hireDate;
}
public String toString()
{
String str;
str = "Name: " + employeeName
+ "\nNum: " + employeeNumber
+ "\nDate: " + hireDate;
return str;
}
}
public class ProductionWorker
{
public String employeeName;
public int employeeNumber;
public double hireDate;
public double payRate;
public int Shift;
}
public ProductionWorker(String n, int num, double date, double rate, int sh);
{
employeeName = n;
employeeNumber = num;
hireDate = date;
payRate = rate;
Shift = sh;
}
public void setN(String n)
{
employeeName = n;
}
public void setNum(int num)
{
employeeNumber = num;
}
public void setDate(double date)
{
hireDate = date;
}
public void setRate(double rate)
{
payRate = rate;
}
public void setSh(double sh)
{
Shift = sh;
}
public String getN()
{
return employeeName;
}
public String getNum()
{
return employeeNumber;
}
public String getDate()
{
return hireDate;
}
public String getRate()
{
return payRate;
}
public String getSh()
{
return Shift;
}
public String toString()
{
String str;
str = "Name: " + employeeName
+ "\nNum: " + employeeNumber
+ "\nDate: " + hireDate
+ "\nRate: " + payRate
+ "\nSh: " + Shift;
return str;
}
}
public class ProductionWorker
{
public static void main(String[] args)
{
String shift; // To hold a shift value
// Create a ProductionWorker object and pass the initialization
// data to the constructor.
Employee pw =
new ProductionWorker("John Smith", "123-A", "11-15-2005",
ProductionWorker.DAY_SHIFT, 16.50);
// Display the data.
System.out.println("Here's the first production worker.");
System.out.println(pw);
System.out.println();
// Make some changes:
pw.setName("Jon Smyth");
pw.setEmployeeNumber("123-B");
pw.setHireDate("11-15-2004");
System.out.println("After making some changes.");
System.out.println(" Name: " + pw.getName());
System.out.println(
" Employee Number: " + pw.getEmployeeNumber());
System.out.println(" Hire Date: " + pw.getHireDate());
System.out.println();
// Create another ProductionWorker object and use the
// set methods.
ProductionWorker pw2 = new ProductionWorker();
pw2.setName("Joan Jones");
pw2.setEmployeeNumber("222-L");
pw2.setHireDate("12-12-2005");
pw2.setShift(ProductionWorker.NIGHT_SHIFT);
pw2.setPayRate(18.50);
// Display the data.
System.out.println("\nHere's the second production worker.");
System.out.println(pw2);
}
}
Last edited by Hack; 09-17-2009 at 12:39 PM.
Reason: Added Code Tags
-
jpreddy_nick: See Post #3 in this thread.
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
Similar Threads
-
By Sonia in forum VB Classic
Replies: 3
Last Post: 10-11-2005, 06:14 AM
-
By Pyrite90 in forum .NET
Replies: 1
Last Post: 05-09-2005, 08:26 PM
-
Replies: 5
Last Post: 04-26-2002, 07:32 AM
-
By ebzb in forum Enterprise
Replies: 0
Last Post: 11-28-2001, 11:33 AM
-
By ---> Pedro Ávila in forum VB Classic
Replies: 0
Last Post: 10-09-2001, 07:36 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks