What is equivalent of JInternalFrame in JavaFX 2.0?

what is equivalent of JInternalFrame in JavaFX 2.0?
Actually I want to use pure javaFX 2.0 to view report created in iReport 5.0.0.
I have used java.swing code, and now I want to use pure javaFX 2.0.
My code in swing is as follows
* To change this template, choose Tools | Templates
* and open the template in the editor.
package reports;
import java.awt.BorderLayout;
import java.awt.Container;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.HashMap;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.view.JRViewer;
* @author TANVIR AHMED
public class ReportsViewer extends javax.swing.JInternalFrame {
* Creates new form MyiReportViewer
private ReportsViewer()
super("Report Viewer",true,true,true,true);
initComponents();
setBounds(10,10,600,500);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
public ReportsViewer(String fileName)
this(fileName,null);
public ReportsViewer(String fileName,HashMap parameter)
this();
try
/* load the required JDBC driver and create the connection
here JDBC Type Four Driver for MySQL is used*/
//Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE", "invoice", "item");
//Connection con=DriverManager.getConnection("jdbc:mysql://localhost/inventory","root","karim");
/*(Here the parameter file should be in .jasper extension
i.e., the compiled report)*/
JasperPrint print = JasperFillManager.fillReport(
fileName, parameter, con);
JRViewer viewer=new JRViewer(print);
Container c=getContentPane();
c.setLayout(new BorderLayout());
c.add(viewer);
catch(SQLException sqle)
sqle.printStackTrace();
catch(JRException jre)
jre.printStackTrace();
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 394, Short.MAX_VALUE)
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 290, Short.MAX_VALUE)
pack();
}// </editor-fold>
// Variables declaration - do not modify
// End of variables declaration
and
* To change this template, choose Tools | Templates
* and open the template in the editor.
package reports;
import java.beans.PropertyVetoException;
* @author TANVIR AHMED
public class MainUI extends javax.swing.JFrame {
* Creates new form MainUI
public MainUI() {
super("REPORTS");
initComponents();
setSize(java.awt.Toolkit.getDefaultToolkit().getScreenSize());
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jMenuItem1 = new javax.swing.JMenuItem();
desktopPane = new javax.swing.JDesktopPane();
salesTaxInv = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
supplyRegister = new javax.swing.JButton();
PartyLedger = new javax.swing.JButton();
menuBar = new javax.swing.JMenuBar();
jMenuItem1.setText("jMenuItem1");
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
desktopPane.setBackground(new java.awt.Color(255, 204, 0));
desktopPane.setBorder(new javax.swing.border.MatteBorder(null));
desktopPane.setForeground(new java.awt.Color(255, 0, 102));
desktopPane.setAutoscrolls(true);
desktopPane.setFont(new java.awt.Font("Bookman Old Style", 0, 14)); // NOI18N
desktopPane.setPreferredSize(new java.awt.Dimension(1024, 768));
salesTaxInv.setBackground(new java.awt.Color(255, 255, 255));
salesTaxInv.setFont(new java.awt.Font("Bookman Old Style", 1, 18)); // NOI18N
salesTaxInv.setForeground(new java.awt.Color(204, 0, 0));
salesTaxInv.setText("Sales Tax Invoice");
salesTaxInv.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
salesTaxInvActionPerformed(evt);
salesTaxInv.setBounds(20, 53, 200, 31);
desktopPane.add(salesTaxInv, javax.swing.JLayeredPane.DEFAULT_LAYER);
jLabel1.setFont(new java.awt.Font("Bookman Old Style", 0, 24)); // NOI18N
jLabel1.setForeground(new java.awt.Color(50, 72, 255));
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel1.setText("Invoice System Reports");
jLabel1.setBounds(0, -1, 1024, 50);
desktopPane.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);
supplyRegister.setFont(new java.awt.Font("Bookman Old Style", 1, 18)); // NOI18N
supplyRegister.setForeground(new java.awt.Color(204, 0, 0));
supplyRegister.setText("Supply Register");
supplyRegister.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
supplyRegisterActionPerformed(evt);
supplyRegister.setBounds(20, 100, 200, 30);
desktopPane.add(supplyRegister, javax.swing.JLayeredPane.DEFAULT_LAYER);
PartyLedger.setFont(new java.awt.Font("Bookman Old Style", 1, 18)); // NOI18N
PartyLedger.setForeground(new java.awt.Color(204, 0, 0));
PartyLedger.setText("Party Ledger");
PartyLedger.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
PartyLedgerActionPerformed(evt);
PartyLedger.setBounds(20, 140, 200, 30);
desktopPane.add(PartyLedger, javax.swing.JLayeredPane.DEFAULT_LAYER);
setJMenuBar(menuBar);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(desktopPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
pack();
}// </editor-fold>
private void salesTaxInvActionPerformed(java.awt.event.ActionEvent evt) {                                           
try
ReportsViewer myiReportViewer = new ReportsViewer("reports/INV.jasper");
myiReportViewer.setBounds(0, 0, desktopPane.getWidth(), desktopPane.getHeight());
myiReportViewer.setVisible(true);
desktopPane.add(myiReportViewer);
myiReportViewer.setSelected(true);
catch (PropertyVetoException pve)
pve.printStackTrace();
private void supplyRegisterActionPerformed(java.awt.event.ActionEvent evt) {                                              
try
ReportsViewer myiReportViewer = new ReportsViewer("reports/supplyRegister.jasper");
myiReportViewer.setBounds(0, 0, desktopPane.getWidth(), desktopPane.getHeight());
myiReportViewer.setVisible(true);
desktopPane.add(myiReportViewer);
myiReportViewer.setSelected(true);
catch (PropertyVetoException pve)
pve.printStackTrace();
private void PartyLedgerActionPerformed(java.awt.event.ActionEvent evt) {                                           
try
ReportsViewer myiReportViewer = new ReportsViewer("reports/CustomerLedger.jasper");
myiReportViewer.setBounds(0, 0, desktopPane.getWidth(), desktopPane.getHeight());
myiReportViewer.setVisible(true);
desktopPane.add(myiReportViewer);
myiReportViewer.setSelected(true);
catch (PropertyVetoException pve)
pve.printStackTrace();
* @param args the command line arguments
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new MainUI().setVisible(true);
// Variables declaration - do not modify
private javax.swing.JButton PartyLedger;
private javax.swing.JDesktopPane desktopPane;
private javax.swing.JLabel jLabel1;
private javax.swing.JMenuItem jMenuItem1;
private javax.swing.JMenuBar menuBar;
private javax.swing.JButton salesTaxInv;
private javax.swing.JButton supplyRegister;
// End of variables declaration
Best Regards

Dear Sir,
I am using the swing code and running the jasper report with the above code.
Realy!
I start the thread with this code
@FXML
private void mainUiButtonAction(ActionEvent event) {
try{
new MainUI().setVisible(true);
catch(Exception ex){                 
}

Similar Messages

  • What is equivalent ASCP report for Planned Order&Order Reschedule Report

    What is equivalent report for Supply Chain Planned Order Report & Supply Chain Order Reschedule Report
    We are currently on MRP and running Supply Chain Planned Order Report successfully. We are planning to go to ASCP(Decentralized) next month ,what is the equivalent reports in ASCP?
    Edited by: SanDan on Jan 9, 2013 1:57 PM

    Hi ,
    You can explore the Planning Detail Report which you can run against your ascp plan. However there are few standard reports available in ascp. I suggest you can explore option of building custom report which will be best suited to your business needs (i.e. using Discoverer or if you are also implementing obiee you can build a custom report based on standard views or noitex views (- for ascp)
    Regards
    narendra

  • What is equivalent to 'with clause' in oracle

    what is equivalent to 'with clause' in oracle
    thanks

    My reqirement is :
    I have a table named egroup. I have to find the name of the egroup different from "other" that can be found in the most countries in Africa
    create table EGROUP(
         c_id     char(2), -- country id
         egroup     varchar2(40), -- name of the ethnic group
         percent number(4,2), -- percentage of population
         constraint egroup_fk foreign key(c_id) references COUNTRY,
         constraint egroup_pk primary key(c_id,egroup)
    insert into egroup values('AF','Pashtun', 42 );
    insert into egroup values('AF','Tajik',27 );
    insert into egroup values('AF','Hazara',9 );
    insert into egroup values('AF','Uzbek',9 );
    insert into egroup values('AF','Aimak',4 );
    insert into egroup values('AF','Turkmen',3 );
    insert into egroup values('AF','Baloch',2 );
    insert into egroup values('AF','other',4 );
    insert into egroup values('AL','Albanian', 95 );
    insert into egroup values('AL','Greek',3 );
    insert into egroup values('AL','other',2 );
    insert into egroup values('AG','Arab-Berber', 99 );
    insert into egroup values('AG','European',1 );
    insert into egroup values('AQ','Samoan (Polynesian)', 89 );
    insert into egroup values('AQ','Caucasian',2 );

  • I am working through a tutorial based on Illustrator CS6, but I am using CS5.  The tutorial requests that I open "Image Trace" but I don't see this function on CS5... please could you advise what the equivalent tool would be?  Thank you!

    I am working through a tutorial based on Illustrator CS6, but I am using CS5.  The tutorial requests that I open "Image Trace" but I don't see this function on CS5... please could you advise what the equivalent tool would be?  Thank you!

    I think in CS5, it was called "Live-Trace." Whatever it's called, it should become available on the options panel (the context-sensitive control panel at the top) when you select a trace-eligible raster image on your artboard.

  • SQL Server uniqueidentifier cast to binary...what is equivalent in Oracle?

    Hi,
    I am having trouble understanding equivalent data types in my conversion from SQL Server to Oracle.
    Let's say I have this statement in SQL Server, where the string being "passed in" is a uniqueidentifier:
    select cast(substring('EFDA8997-63AA-4F33-96CF-29BFC2CE252E',8,1) as binary(1));
    The tool I've used to convert this to Oracle says the equivalent statement to this is (where the string being "passed in" is a char:
    select cast((substr('EFDA8997-63AA-4F33-96CF-29BFC2CE252E',8,1)) as raw(1)) from dual;
    However, I get different results when testing these two statements:
    SQL Server: 0x37
    Oracle: 07
    What is the correct what to convert this statement to Oracle?
    Thank you!
    Mimi

    I should add that this an n-tier application, where data is passed across multiple tiers, so the client UI has no connection to the database.
    I'm assuming this means that select..for update is not suitable, as that would require a connection to the database to be held open for a specific user in the middle-tier. Not suitable for a scalable, n-tier scenario.

  • What is equivalent for missing keys on MAC vc PC?

    I am switching from PC to MacBook Pro
    Some keys on a PC keyboard do not exist on the macbook, so I am wondering what the keyboard equivalent is? I would like to know the equivalent under mac OS x and under Parallels VS running wind xp,
    Keys missing:
    Page Up, Page Down
    Home, End
    Insert, Delete (i.e. delete the next character forward; the delete key on the mac seem to be the same as a PC backspace key)
    Print Screen (and alt print screen to print focus window only)
    Thanks
    Bob

    If buying a new keyboard won't break the bank, Logitech makes a few cross platform keyboards that have all the keys you'd expect to find as a Mac OS user and/or as a Windows user on the same keyboard.
    Here's a link to their Wave Keyboard:
    http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3071&cl=us,en
    They make a few other models for both Mac and Windows. Just follow the "keyboard" link on their web site and browse for ones with both the Windows and Mac icons.
    -Warren

  • What is the status of the JavaFX Authoring Tool?

    Hi. Several months ago now I was excited to see the following presentation about a JavaFX Authoring Tool that was presented at JavaOne 2009.
    http://www.youtube.com/watch?v=8a988IyTHVU
    We are only a few months away from JavaOne 2010 and it's hard to find out anything about this tool. If this is still in development does anyone have any news on release date, features, beta program etc.
    Thanks.
    John

    I am assuming everyone has seen the demo and pictures of the new authoring tool. I personally think it's very exciting and it could be as good or better than the tool provided by Adobe for Flash. However, having siad all that, I am really surprised by the lack of interest in this post. I was hoping more developers would show an interest in this post and the tool, or even the tool developers tease us with some more information. It makes me wonder if JavaFx has died before it has even started, or if no one is really interested in a tool like this.
    Edited by: coolbeans47 on Jun 21, 2010 10:42 AM

  • What's equivalent to "Freeze Panes" in Excel?

    I've used Excel for years at work. Now I've not Numbers at home. I can't figure out how to "freeze panes" so, as I scroll down a page, the header row stays visible. Help?

    While Freeze Panes does not exist, Jason over on www.numberstemplates.com
    came up with this solution:
    http://www.numberstemplates.com/forums/showthread.php?t=20
    His demonstration consists of 3 tables. The third table is where the full spreadsheet exists. The second table is a "window" onto the third table. The first table is just two slider bars. As you slide the sliders, the second table adjusts what it is showing in the second table from the data in the third. This makes more sense once you try his example.
    If you are just looking at data, his solution works very well. If you need the freeze panes so that you know what column to input the data into, well, keep hitting that "Provide Numbers Feedback" button. until it appears.

  • What's equivalent to browser.tab.close=3 in the latest version?

    The last version that supported this feature was 30.0. I plan on continuing to use this version until/unless I find out the latest version supports it again. ([email protected])

    You're welcome

  • Productivity with apple for small businesses?What is Apples equivalent software to MS project?

    I have just moved to a mac and im looking for some project management software and was just wondering what the equivalent to ms project on a mac is? i am looking to be as productive as possible with  =all my business contacts customer database invoices tasklists projects...what should i utilise on a mac to do that?

    iWork(Pages, Keynote, Numbers) could be.
    -- kaz-k

  • Can anyone tell me why javaFX better than applet?

    I just have read the example of javaFX.And I have a question.
    From the example.I don't see any good in javaFX.below is my opinion:
    1.It seems like that the javaFX application is deploy as a applet or jnlp.This is what swing can also do;
    2.javaFX's expression is sucks.Why don't use xml to declare the UI? I think as the application becomes larger,it is so difficult to maintain the project.But if I use swing or applet,I think it is better for me to maintain the project using oop.
    3.I think what javaFX can do is also can be done by swing,why javaFX?
    any apply is appreciated,thanks very much

    Hi
    1. JavaFx it is build over the Java2D and Swing. In fact it can not run without this 2 component ( at least now ). So what you can do in JavaFX you can also do on Swing and Java2D
    2. I don't think xml syntax it is good to describe stuff like this . XML was design to store data not actions. When you design user interface you must declare what components or shape do you want to draw on the screen but also you must write the interaction between them . I don't think you can do this easy and nice in XML. Look at the Flex approach . They used for declaration of the GUI an XML and for comportment ActionScript. I don't like this because i must learn and study two "languages" to make a GUI.I've preferred one language.As you said it is better to use OOP . How can you do OOP in XML in a nice way ?
    3. Because in JavaFX we do can more things easily . Look at this example : [http://silveiraneto.net/2008/07/31/javafx-creating-a-sphere-with-shadow/] . I don't think you can achieve the same results with Swing and Java2D with the same code line number.
    Another difference between JavaFX and Swing is the syntax. The Sun want to create a language that can be used by designer and by programmer . The Swing can not be used by a designer . JavaFX used a more natural syntax. For example if you want to insert a shape in an array you must type in JavaFX :
    insert Circle{radius:10} into array_variable . As you see it is more natural this syntax than Java equivalent.
    Another difference it is how easy you can do things in JavaFX correctly . When you program in Java2D and Swing you must know very good the architecture of this components if you want to work correctly . You must know what is the Event Dispatch Thread and how you can used it . You must how you can work with multiple threads in Java2D and Swing . In JavaFX you don't need this . All of the tricks it is done by JavaFX ( not in this release . I hope the final release it will contains all these tricks) .
    Best regards
    Andrei Dore

  • JavaFx applet-less

    Hi all,
    I am completely new with JavaFx and although I've been doing some research, I have not been able to find out how JavaFx can be decoupled with applets. Applets are a big no-no in enterprise applications because of their "no-secured-container-required" feature. I was hoping to implement some web client-side scripting (equivalent to javascript) with JavaFx without it requiring an applet to be loaded and what not....
    Has anyone wondered, come across or implemented this with JavaFx ?
    Thanks,

    I don't understand the "no-secured-container-required" part. Applets can be signed, so, secured. What I am missing?
    Beside, JavaFX is designed to work on desktop too: lot of samples on the Web have a JNLP (Java Web Start) link, and you can have this JNLP file on your hard disk and start the JavaFX application in its own window, without any browser running.

  • JInternalFrame not opening in JAR file, but works when not in JAR

    I have a folder that contains multiple .class files. I make all the class files into one jar file with this command:
    jar cmf mainClass.txt myapplication.jar *.class
    The mainClass.txt contains the following:
    Main-Class: myapplication
    class-path: myapplication.jar
    The myapplication.class opens up a JDesktopPane inside a JFrame. It also contains a start menu, which again has elements that opens up misc JInternalFrames inside the JDesktopPane. The problem is this:
    When I run the application from a .bat file, everything works fine. However, after making the JAR Executable file, everything works except 1 JInternalFrame. Now, the code for this JInternalFrame is far too much to post, so I'll have to ask as follows;
    Are there any reason why a JInternalFrame would not work from inside a JAR Executable, but work when not in the JAR file? Especially when other JInternalFrames are working? What can make 1 JInternalFrame different from the others in this regard?

    Perhaps the problem lies somewhere else.
    Obviously if other JInternalFrames are working then there is a difference in the one missing internal frame that causes it not to show up.
    My guess is that perhaps you are missing one or two classes in your JAR that are used by that JInternalFrame and that an exception is being thrown causing it not to show.
    Double check the contents of your JAR and make sure that all the classes are present and that they are the right versions.

  • 8.1 equivalent of portlet:form event=bea.portal.framework.internal.refresh

    I've got a portlet with an edit JSP that allows the user to set some portlet settings. The edit JSP uses a form defined with the tag <portlet:form event="bea.portal.framework.internal.refresh" >. This in essence allowed the edit JSP to submit the form to itself, so it could then process (store) the settings.
    This tag is no longer supported in 8.1. I haven't been able to find what the equivalent is. Am I going to be able to do the same thing, or am I going to have to rewrite the Edit piece as a page flow?

    I've already tried that and it's not working in my current portal.
    The other things I've tried are <render:postBackUrl/> and <render:windowUrl> for the form action, and they weren't working, either. But since then I've discovered that in a new vanilla portal installation, the <render:postBackUrl/> action works fine (I assume the controller would, too, but I didn't try it).
    It seems I now have a different problem to work through to figure out why <render:postBackUrl/> works in a new installation, but not in my current one. The same goes for the controller.

  • Using JavaFX in Eclipse 4

    I am trying to determine whether JavaFX can be used as the basis for UI development in the context of an eclipse 4 RCP application.  I am just learning about eclipse 4 and what they've done differently from eclipse 3.x - specifically the concepts of products and features, application model and the newer mechanism for defining the major eclipse RCP application infrastructure.  I went through a tutorial on e4 (Eclipse 4 RCP - Tutorial) and that gave me a pretty good overview and introduction to e4.  The tutorial does not go into what would be involved to integrate JavaFX with eclipse 4, though (not that I would expect it to).
    So, I've taken the sample app that I'd built as part of doing the tutorial and set about seeing if I could implement a JavaFX UI and incorporate it as one of the parts of the small app.  I haven't had much luck so far.  Unfortunately, I'm blundering around modifying the various eclipse 4 "components" (i.e. the "product", "feature" and "plug-in" files) without really any clue as to what I should be doing.
    Here are some details of my environment and what I've done so far.
    Windows 7
    Eclipse Kepler (4.3.1)
    Java 1.7
    e(fx)clipse has been installed
    The sample application built in the tutorial involves:
    Plug-in project with some simple classes that define the "parts", handlers and other stuff needed by e4.
    The e4 "feature" project which is basically just a feature.xml which lists the plug-in.
    The e4 "product" project which has just the .product file, using the feature.
    Prior to my attempts to add JavaFX to the mix, this little application works perfectly.  I created an FXCanvas class (containing nothing at this point) that I attempted to embed in one of the parts to represent its UI.  Then, when I tried to run the "product" I'd get various errors or exceptions depending upon the things I tried.  The problems that occurred unfortunately weren't clear to me as to what is wrong.  I tried adding the javafx plugin to various elements, with varying resulting failures.  At this point I'm at a total loss as to what to do to make this work.
    I was going to try to add some screen shots, but I am prevented from doing so.  There is also no way to add attachments.

    Thanks a lot for your response.
    Can you elaborate on it please?
    I am new to flex so not aware of all the terminologies and process.

Maybe you are looking for