Query on Swing Concepts

hello all,
i am unclar about swing container concepts w.r.t content panes, root panes, layered panes and glass panes.
could anyone throw light on the same in simple language.
i have gone thru many tutorials and i am unclear including sun website.
under what situation would we use these diffrent panes.
also clear difference between lightweight and heavyweight componets of awt and swings.
thanx in advance.

I can explain the second part of your question "differance between lightweight and heavyweight". Lightweight components are components that have no dependance on native GUI elements from the underlying Operating System, they are drawn directly by pure java drawing routines. On the other hand heavyweight components are dependant on an OS native "peer" object for some functionality. This makes heavyweight objects have a higher memory footprint.

Similar Messages

  • Query on Oracle Concepts: Advantages of ASSM

    Hi,
    A query on Oracle Concepts, specifically on Advantages of ASSM.
    While I am able to understand 'Simplified administration' & 'Increased concurrency', can anyone mention this in simple terms:
    • Dynamic affinity of space to instances in an Oracle Real Application Clusters (Oracle RAC) environment.I guess I know whats Oracle RAC but what it meant by 'Dynamic affinity of space to instances'?
    Regards,
    Ankit Rathi

    Hi Aman,
    I was going through Oracle® Database Concepts 11g Release 2, Chapter 12 Logical Storage Structures (link below):
    http://docs.oracle.com/cd/E11882_01/server.112/e25789/logical.htm#i19599
    *Automatic Segment Space Management*
    The ASSM method uses bitmaps to manage space. Bitmaps provide the following advantages:
    •Simplified administration
    ASSM avoids the need to manually determine correct settings for many storage parameters. Only one crucial SQL parameter controls space allocation: PCTFREE. This parameter specifies the percentage of space to be reserved in a block for future updates (see "Percentage of Free Space in Data Blocks").
    •Increased concurrency
    Multiple transactions can search separate lists of free data blocks, thereby reducing contention and waits. For many standard workloads, application performance with ASSM is better than the performance of a well-tuned application that uses MSSM.
    •Dynamic affinity of space to instances in an Oracle Real Application Clusters (Oracle RAC) environment
    ASSM is more efficient and is the default for permanent, locally managed tablespaces.Regards,
    Ankit Rathi

  • Syntax error in OBIEE generated Physical query - Advance filter concept

    I encountered a syntax error when running a report with the help of advanced filter concept.
    I am getting syntax error at the physical query generated by the OBIEE for main report.
    I used a sub report with the help of advanced filter concept in main report.
    I am posting the physical query for the convenience.
    select D1.c2 as c1,
    D1.c1 as c2
    from
    (select sum(T600347.sales_usd) as c1,
    T601002.currency as c2
    from
    (Select distinct currency from pfact) T601002,
    pfact T600347
    where ( T600347.currency = T601002.currency and T600347.pdate between ( select distinct min(D1.c1) as c1* from
    (select D1.c1 as c1
    from
    (select D1.c1 as c1
    from
    *(select max(T600425.pdate) as c1*
    from
    *(select distinct pdate from pdates where pdate is not null) T600425*
    where  ( T600425.pdate < 11/22/2010 )
    *) D1*
    ) D1
    ) D1 ) and '11/25/2010')
    group by T601002.currency
    ) D1
    I executed the query against my database(sybase) in query tool. It showed error.
    I took out the column alias generated by the OBIEE ("as c1" as underlined). Then the query is working fine.
    How to disable OBIEE from generating the alias.
    Is there any way to do it.
    If obiee is generating the physical query, i am suprised to see a syntax error.
    The bold part is the query from Intermediate report
    I underlined the problematic part.
    Please help me. This is an urgent reuirement,
    Thanks in advance for the help.

    HI,
    When I execute the query on query tool ( my database is sybase)
    I am geting error at "as c1" part, as underlined in the query.
    when I remove that and execute the query, It is generating the output.
    here is the better view of query and error:
    http://img255.imageshack.us/img255/4719/25187227.jpg

  • Query on interface concept

    Class A{}
    Interface I{}
    public Class B
    Public static void main ( String[] xx)
    A a = new A();
    I ii = a; // it doesn?t ..
    I i = (I) a ; // it works WHY?
    // why this code compiles ?

    newbie_007 wrote:
    Class A{}
    Interface I{}
    public Class B
    Public static void main ( String[] xx)
    A a = new A();
    I ii = a; // it doesn?t ..
    I i = (I) a ; // it works WHY?
    // why this code compiles ?public class B
    public static void main ( String[] xx)
    A a = new A();
    A ii = a; // it doesn?t ..
    I i = (I) a ; // it works WHY?
    class A{}
    interface I{}
    but this compiles and I wonder too. But when I run it, it throus
    Exception in thread "main" java.lang.ClassCastException: A cannot be cast to I
         at B.main(B.java:15)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
    interesting.
    Edited by: Tiko_dev on Apr 30, 2009 7:11 AM

  • Query on Oracle Concepts: Table Compression

    The attributes for table compression can be declared for a tablespace, table, or table partition. If declared at the tablespace level, then tables created in the tablespace are compressed by default. You can alter the compression attribute for a table, in which case the change only applies to new data going into that table. Consequently, a single table or partition may contain compressed and uncompressed blocks, which guarantees that data size will not increase because of compression. If compression could increase the size of a block, then the database does not apply it to the block.
    Can anybody please explain text marked as bold? How can data-size/block-size can increase by compression?
    Regards,
    Ankit Rathi
    http://oraclenbeyond.blogspot.in

    >
    The attributes for table compression can be declared for a tablespace, table, or table partition. If declared at the tablespace level, then tables created in the tablespace are compressed by default. You can alter the compression attribute for a table, in which case the change only applies to new data going into that table. Consequently, a single table or partition may contain compressed and uncompressed blocks, which guarantees that data size will not increase because of compression. If compression could increase the size of a block, then the database does not apply it to the block.
    Can anybody please explain text marked as bold? How can data-size/block-size can increase by compression?
    >
    First let's be clear on what is being said. The doc says this:
    >
    If compression could increase the size of a block, then the database does not apply it to the block.
    >
    That is misleading because, of course, the size of the block can't change. You should really read that as
    >
    If compression could increase the size of the data being stored in a block, then the database does not apply it to the block.
    >
    There is overhead associated with the compression because the metadata that is needed to translate any compressed data back into its original state is stored in the block along with the compressed data.
    The simplest analogy (though not a perfect one) is the effect you can get if you try to zip an already highly compressed file.
    For example, if you try to use Winzip to compress an image file (jpg, gif, etc) or a video file you can easily wind up with a zip file that is larger than the uncompressed file was to begin with. That is because the file itself hardly compresses at all but the overhead of the zip file adds to the ultimate file size.
    I suggest you edit your thread subject since this question is NOT about partitioning.

  • Query on swing packages

    Hi,
    Please tell me the differences between
    import sun.awt.image.*;
    import java.awt.image.*;
    import com.sun.image.*;
    Thanks.

    I can explain the second part of your question "differance between lightweight and heavyweight". Lightweight components are components that have no dependance on native GUI elements from the underlying Operating System, they are drawn directly by pure java drawing routines. On the other hand heavyweight components are dependant on an OS native "peer" object for some functionality. This makes heavyweight objects have a higher memory footprint.

  • Problem in JSF with Swing in a web application

    hi
    i am using jsf for my online projects.my problem is that when i use Swing concept ,the server is closed automatically when i click the swing dialog option 'OK', how can i protect server being closed automatically when user click the the options of Swing dialog box.it is so tedious because my application is going to integrate
    with online server?
    my swing java file is
    * FileExistsDialog.java
    package com.obs.ftw.util.alert;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.Rectangle2D;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.plaf.metal.MetalLookAndFeel;
    * FileExistsDialog: A JOptionPane-like dialog that displays the message
    * that a file exists.
    public class FileExistsDialog extends JDialog {
    * The component that gets the focus when the window is first opened
    private Component initialFocusOwner = null;
    * Command string for replace action (e.g., a button).
    * This string is never presented to the user and should
    * not be internationalized.
    private String CMD_REPLACE = "OK"/*NOI18N*/;
    * Command string for a cancel action (e.g., a button).
    * This string is never presented to the user and should
    * not be internationalized.
    private String CMD_CANCEL = "CANCEL"/*NOI18N*/;
    // Components we need to access after initialization
    private JButton replaceButton = null;
    private JButton cancelButton = null;
    public FileExistsDialog(){
         System.out.println("INSIDE THE FILE EXIST DIALOG");
         JFrame frame = new JFrame() {
         public Dimension getPreferredSize() {
         return new Dimension(200,100);
         frame.setTitle("Debugging frame");
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         frame.pack();
         frame.setVisible(false);
    FileExistsDialog dialog = new FileExistsDialog(frame, true);
         dialog.addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent event) {
         System.exit(0);
         public void windowClosed(WindowEvent event) {
         System.exit(0);
         dialog.pack();
         dialog.setVisible(true);
    * Creates a new FileExistsDialog
    * @param parent parent frame
    * @param modal modal flag
    public FileExistsDialog(Frame parent,boolean modal) {
    super(parent, modal);
         //initResources();
         System.out.println("INSIDE THE FILE EXIST DIALOG CONSTRUCTOR");
    initComponents();
    pack();
    * Determines the locale, loads resources
    /* public void initResources() {
         Locale locale = Locale.getDefault();
    resources = ResourceBundle.getBundle(
              "samples.resources.bundles.FileExistsDialogResources", locale);
    imagePath = resources.getString("images.path");
    }*/ // initResources()
    * Sets all of the buttons to be the same size. This is done
    * dynamically after the buttons are created, so that the layout
    * automatically adjusts to the locale-specific strings.
    private void equalizeButtonSizes() {
         System.out.println("INSIDE THE equalizeButtonSizes()");
    String[] labels = new String[] {
    replaceButton.getText(),
         cancelButton.getText()
         // Get the largest width and height
         Dimension maxSize= new Dimension(0,0);
         Rectangle2D textBounds = null;
         Dimension textSize = null;
    FontMetrics metrics =
              replaceButton.getFontMetrics(replaceButton.getFont());
         Graphics g = getGraphics();
         for (int i = 0; i < labels.length; ++i) {
         textBounds = metrics.getStringBounds(labels, g);
         maxSize.width =
         Math.max(maxSize.width, (int)textBounds.getWidth());
         maxSize.height =
         Math.max(maxSize.height, (int)textBounds.getHeight());
    Insets insets =
         replaceButton.getBorder().getBorderInsets(replaceButton);
    maxSize.width += insets.left + insets.right;
    maxSize.height += insets.top + insets.bottom;
    // reset preferred and maximum size since BoxLayout takes both
         // into account
    replaceButton.setPreferredSize((Dimension)maxSize.clone());
    cancelButton.setPreferredSize((Dimension)maxSize.clone());
    replaceButton.setMaximumSize((Dimension)maxSize.clone());
    cancelButton.setMaximumSize((Dimension)maxSize.clone());
    } // equalizeButtonSizes()
    * This method is called from within the constructor to
    * initialize the dialog.
    private void initComponents() {
         System.out.println("INSIDE THE initComponents()");
         // Configure the window, itself
    Container contents = getContentPane();
    contents.setLayout(new GridBagLayout ());
    GridBagConstraints constraints = null;
    setTitle("Waring");
         // accessibility - all applets, frames, and dialogs should
         // have descriptions
         this.getAccessibleContext().setAccessibleDescription("Descriptions");
         addWindowListener(new WindowAdapter() {
         public void windowOpened(WindowEvent event) {
              // For some reason the window opens with no focus owner,
              // so we need to force the issue
         if (initialFocusOwner != null) {
              initialFocusOwner.requestFocus();
              // Only do this the 1st time the window is opened
              initialFocusOwner = null;
         public void windowClosing(WindowEvent event) {
         System.out.println("INSIDE THE windowClosing");     
         // Treat it like a cancel
              windowAction(CMD_CANCEL);
         // image
    JLabel imageLabel = new JLabel();
    imageLabel.setIcon(
    new ImageIcon("/images/degraded_large.gif"));
    // accessibility - set name so that low vision users get a description
    imageLabel.getAccessibleContext().setAccessibleName("OK");
    constraints = new GridBagConstraints ();
    constraints.gridheight = 2;
    constraints.insets = new Insets(12, 33, 0, 0);
    constraints.anchor = GridBagConstraints.NORTHEAST;
    contents.add(imageLabel, constraints);
    // header
    JLabel headerLabel = new JLabel ();
    headerLabel.setText("SAMPLE");
    headerLabel.setForeground(
         new Color(MetalLookAndFeel.getBlack().getRGB()));
    constraints = new GridBagConstraints ();
    constraints.insets = new Insets(12, 12, 0, 11);
    constraints.anchor = GridBagConstraints.WEST;
    contents.add(headerLabel, constraints);
         // Actual text of the message
         JTextArea contentTextArea = new JTextArea();
    contentTextArea.setEditable(false);
    contentTextArea.setText("SAMPLE");
    contentTextArea.setBackground(
              new Color(MetalLookAndFeel.getControl().getRGB()));
    // accessibility -- every component that can have the
         // keyboard focus must have a name. This text area has no
         // label, so the name must be set explicitly (if it had a
         // label, the name would be pulled from the label).
    contentTextArea.getAccessibleContext().setAccessibleName(
              "CONTENTNAME");
    constraints = new GridBagConstraints ();
    constraints.gridx = 1;
    constraints.gridy = 1;
    constraints.insets = new Insets(0, 12, 0, 11);
    constraints.anchor = GridBagConstraints.WEST;
    contents.add(contentTextArea, constraints);
         // Buttons
         JPanel buttonPanel = new JPanel();
    buttonPanel.setLayout (new BoxLayout(buttonPanel, 0));
         replaceButton = new JButton();
         replaceButton.setActionCommand(CMD_REPLACE);
    replaceButton.setText("OK");
    replaceButton.setToolTipText("TO OK");
         replaceButton.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent event) {
         windowAction(event);
    buttonPanel.add(replaceButton);
    // spacing
    buttonPanel.add(Box.createRigidArea(new Dimension(5,0)));
         cancelButton = new JButton();
         cancelButton.setActionCommand(CMD_CANCEL);
    cancelButton.setText("CANCEL");
    cancelButton.setNextFocusableComponent(replaceButton);
         cancelButton.setToolTipText("TO CANCEL");
         cancelButton.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent event) {
         windowAction(event);
    buttonPanel.add(cancelButton);
    constraints = new GridBagConstraints ();
    constraints.gridx = 1;
    constraints.gridy = 2;
    constraints.insets = new Insets(12, 12, 11, 11);
    constraints.anchor = GridBagConstraints.WEST;
    contents.add(buttonPanel, constraints);
         // Equalize the sizes of all the buttons
         equalizeButtonSizes();
         // For some reason, the dialog appears with no input focus.
         // We added a window listener above to force the issue
         initialFocusOwner = replaceButton;
    } // initComponents()
    * The user has selected an option. Here we close and dispose the dialog.
    * If actionCommand is an ActionEvent, getCommandString() is called,
    * otherwise toString() is used to get the action command.
    * @param actionCommand may be null
    private void windowAction(Object actionCommand) {
         System.out.println("INSIDE THE WINDOW ACTION");
         String cmd = null;
    if (actionCommand != null) {
         if (actionCommand instanceof ActionEvent) {
         cmd = ((ActionEvent)actionCommand).getActionCommand();
         } else {
         cmd = actionCommand.toString();
         if (cmd == null) {
         // do nothing
         } else if (cmd.equals(CMD_REPLACE)) {
         System.out.println("your replace code here...");
         } else if (cmd.equals(CMD_CANCEL)) {
         System.out.println("your cancel code here...");
         setVisible(false);
         dispose();
    } // windowAction()
    * This main() is provided for debugging purposes, to display a
    * sample dialog.
    // main()
    } // class FileExistsDialog
    and calling java function is
    public String fileDialog(){
         return "Success";
    public void processFile(ActionEvent event){
         System.out.println("INSIDE THE FILE DIALOG");
         FileExistsDialog file     = new FileExistsDialog();
         System.out.println("SUCCESS");
    called from
         <h:commandButton action="#{userLogin.fileDialog}" actionListener="#{userLogin.processFile}"></h:commandButton>
    pls help me as soon
    advance thanks
    rgds
    oasisdeserts

    Swing is GUI library for use in desktop applications.
    JSF is a web application framework which runs on an application server and is accessed by clients via web browsers.
    To fully understand what you have done, try accessing your application from a different machine than the server.
    To answer your question, don't invoke System.exit() if you would like the process to continue. But that is the least of your problems.

  • Dynamic Querying in ESB

    Hey,
    I am trying to implement dynamic querying using the query by example concept. My requirement is as follows:
    "Say I have 5 inputs , I need to fetch rows from the database using those 5 inputs as a part of my where clause"
    The user input are optional. Hence using the query by example concept I was able to filter rows.
    But the problem is as follows:
    1) I have a "time from" and "a time to" field as user inputs. I need to filter the fetched rows so that time is in that time range only. I do not know how to implement this also along with the above concept as there is no place for a where clause.
    Any help/suggestions would be appreciated.
    Thanks

    I tried applying the patch, but it gives the following error:
    OPatch detects your platform as 207 while this patch 6133448 supports platforms:
    0 (Generic Platform)
    This patch is not suitable for this operating system.
    Please contact support for the correct patch.
    ERROR: OPatch failed during pre-reqs check.
    OPatch returns with error code = 150
    I downloaded for the OS I am on, but always the generic patch downloads; i guess this generic one should work for all platforms. Opatch version is 1.0.0.0.56.

  • Hide a column in BW Query

    Hi Gurus!
    I'd like to hide a column for specifics users in a BW Query.
    I flagged the InfoObject as Auth. Rel. and created an analysis authorization. I ran the query but I got "No authorization", when I checked the log I saw that the query is asking for full authorization value to that InfoObject. I tried with : (semi colon) value but I got the same result.
    Is there any way to hide a column in a query (with authorization concept) avoiding to redisign a new query?
    Thanks in advance.
    Best regards,
    Pepe

      when I checked the log I saw that the query is asking for full authorization value to that InfoObject
    Is there any way to hide a column in a query (with authorization concept) avoiding to redisign a new query?
    For your existing query, above two are conflicting. So guess you have to move with redesign/new query.
    Regards,
    Arpan Paik

  • Google-Suggest in Swing Desktop Application - Possible?

    Hi All,
    I am building my first Java Swing Application. Apologies in advance for any stupid questions I ask w.r.t. Java Swing concepts.
    I am building a Billing Desktop Application using Java Swing. My backend is a Microsoft Excel. My clarification are:
    *1. I have a set of values in a combo box listed below a jTextField. The values have to be displayed on the Screen as and when the user gives some characters as input. In short, something like a google-suggest functionality.*
    *2. Generate pre-defined set of jLabels and jTextFields on the click on a jButton*
    If this is too much to achieve with Java Swing, I would highly appreciate if you can share any other means to achieve this.
    Thanks,
    Vikas
    Edited by: Vikas.Vij on Feb 23, 2008 11:38 AM

    tutorials http://download.oracle.com/javase/tutorial/uiswing/components/progress.html and http://download.oracle.com/javase/tutorial/uiswing/concurrency/worker.html contains example for that, another examples http://www.java2s.com/Tutorial/Java/0240__Swing/2000__SwingWorker.htm

  • Need Plsql query

    hi
    I need oracle plsql query for this concept , which itemcode present in four month
    Eliminate less than 4 month itemcode
    Itemcode month id
    1000 144
    1000 148
    1000 152
    1000 156
    so on
    ---------- eliminate this types of items
    2000 144
    3000 148
    3000 156
    Note : please dont use Procedures

    785143 wrote:
    hi
    I need oracle plsql query for this concept , which itemcode present in four month
    Eliminate less than 4 month itemcode
    Itemcode month id
    1000 144
    1000 148
    1000 152
    1000 156
    so on
    ---------- eliminate this types of items
    2000 144
    3000 148
    3000 156
    Note : please dont use ProceduresAre you saying that the same itemcode has to be related to 4 (or more) different months?
    Here's one way to do that:
    WITH     got_cnt          AS
         SELECT     itemcode
         ,     month_id
         ,     COUNT (DISTINCT month_id) OVER (PARTITION BY  itemcode)     AS cnt
         FROM     table_x
    SELECT     itemcode
    ,     month_id
    FROM     got_cnt
    WHERE     cnt     >= 4
    ;If you mean something else (such as all the monthids have to be in a series, with a difference of 4 between successive monthids), then explain more clearly.

  • What is the "best" swing book or e-book?

    I am looking for a good book that will teach me the basics of creating simple swing GUI's. I want the book to have good examples and not move too fast, as well as give a detailed explanation of what's going on. I am familiar with basic java so I want a book that only covers swing concepts.
    What swing books have you read and were they good? Please suggest any books and why you suggest them.
    Thank You for your time.

    its true that there is nothing better than the JAVA TUTORIALS but for examples
    you can go to [JAVA2s|http://www.java2s.com/Tutorial/Java/0240__Swing/Catalog0240__Swing.htm] swing section which is a good place to have examples that will clear your idea/concepts
    but prefer SUN tutorial as first place to start.

  • Question on swings help me

    Hi to all i am new to swings concept my problem is
    I taken 8 subjects with 100 marks and 5 labs with 75 marks in my application.
    Know my problem is when i am calculating subjects and labs i am not getting average .
    And but when i am calculate total divided by 13 i am getting average.
    For example : 8 subjects total is 560.
    5 labs total is 250.
    average = total/13
    i am getting average.
    But i want average like this i.e average = total /1175;
    i am taken total = subjects + labs;
    help me regarding this topic
    Thanks in advance

    Hello
    u r did "average = total/13; " this avg is not correct one .....
    bcos 8 subj is respect to 100 and remaining is respect to 75 .
    avg = (getting total marks / totalmarks)*100
    this is the correct way to calculate avg
    i am taken total = subjects + labs;
    all the best
    regards
    Amir

  • Can we see swing application in IE (browser)

    I want to see the output of applet created using swing concepts in the internet explorer. is it posible please help me............

    1. You can see it with 'appletviewer'
    2. You can see it with NScape, Opera or Mosaic
    3. You can d/l the JVM for IntEx
    4. You can use the <target> tag on compiling
    and easiest of all ...
    5. Do not use the javax.swing API for applet publication

  • Java Swing Tutorials

    Hello Everyone,
    Can anyone suggest me some good online tutorials for java swing and beans.As i am new to this swing concept, i need to learn them as quickly as possible as part of my next project.
    Thank you,

    hiii
    i just went through a interview in company who provide online tutorials in all concepts..ELEMENTK
    www.elementk.com
    check out this website for more details

Maybe you are looking for

  • DVCPro 50 QT Codec in Windows

    I have been editing a short film on FCP 4.5 HD on a G5 with the DCVPRO50 - NTSC codec. I am trying to interpolate my workflow to windows because my access to the G5 is limited. When I open the footage on my WinXP cpu I get the whitescreen which signi

  • Mail settings changing without user input

    I have several Mail accounts set up in the following manner (let's please ignore the fact that have far to many accounts, I have collected them as family members came onto the net and in teh process of setting their ISPs up made accounts for myself):

  • Completed form appears blank

    I've received an interactive form (created in Acrobat 9 Pro) back completed, but all the fields appear blank until I click on one & then if I clck on another the previous one appears blank again i.e. only one at a time can be seen Has anyone come acr

  • HT1692 how can i get the previous contact details in iphone

    how can i get the previous contact details in iphone

  • Comparing document versions in Reader?

    Can I compare two versions of the same pdf document and see the changes between versions in Reader?