How to drop component on JPanel

Hi,
i want to drop some component on JPanel.I'm talking about drag n drop concept, but how to apply it on JPanel.
For eg how to drag n drop an image from your tool bar to a JPanel.
Thanks in advance.

Hi,
thanks for ur reply.
But this link is not helping me much...more idea needed....actually my question is to use 'JPanel' to drop component....how to make it work?and also how to resize the component itself by streaching it's border ( something like taht )
thanks...
Edited by: DJgpmax on Jun 17, 2008 2:10 AM

Similar Messages

  • How to add component to JPanel

    Hello,
    I Try to add a JPnel to other JPnel
    but it works not ther is a error in this code ??
    class MyClass extends JFrame
        Container contentPane;
      public MyClass()
                  contentPane = this.getContentPane();
                  contentPane.setBorderLayout(new BorderLayout());
                 MainPanel();
    puplic void MainPanel()
         Dimension dim = new Dimension(w,h);
         Dimension aDim = new Dimension((w / 2),(h / 2));
         JPanel mainPanel = JPanel();
         mainPanel.setPrefferedSize(dim);
         mainPanel.setLayout(new BorderLayout());
         JPanel pp = getLanguagePanel(aDim);
         pp.revalidate();
         mainPanel.add(pp,BorderLayout.PAGE_END);
         mainPanel.revalidate();
         contentPane.add(mainPanel,BoderLayout.CENTER)
    public JPanel getLanguagePanel(Dimension aDim)
             JPanel retPanel = new JPanel();
         retPanel.setPreferredSize(aDim);
         retPanel.setBorder(null);
         JLabel L = new JLabel("Test Label");
         L.setBounds(50,50,250,30);
         retPanel.add(L);
         retPanel.setBackground(Color.GREEN);
         retPanel.setOpaque(true);
         retPanel.revalidate();
         retPanel.repaint();
         return retPanel;
    }thanks

    contentPane.setBorderLayout(...)There is no such method. Your compiler should be telling you this.
    puplic void MainPanel()There is no such modifier. Your compiler should be telling you this.
    mainPanel.setPrefferedSize(...)There is no such method. Your compiler should be telling you this.
    BoderLayout.CENTERThere is no such class. Your compiler should be telling your this.

  • How to drop  EM Oracle Enterprise Manager component from database.

    We have database that somebody used in past as EM Grid repository. This no longer in use. Looking for documentation on how to drop it. If somebody knows please provide me with link to appropriate Oracle document.
    Oracle version 11gR1.
    Thanks.

    I suspect that if you cannot locate the instructions on the proper way to remove EM that you can drop the owning repositiry user sysman from the database then cleanup any database parameters related to EM.
    I would think the place to start would be the EM (Grid Control) installation manual for your version of Oracle and platform.
    10g List of install manuals
    http://otn.oracle.com/pls/db102/drilldown?levelnum=2&toplevel=b31288&method=LIKE&chapters=0&book=&wildcards=1&preference=&expand_all=&result_id=&verb=Installing&word=enterprise+manager#b31288
    HTH -- Mark D Powell --

  • How JComboBox Drop List Works ?

    hi all ,
    I was wondering how the drop list of the jcombobox appears over all other components in the form although the jcombobox takes no reference to its parent.
    best regards

    JComboBox doesn't really need to know about its parent to draw over the top. You need to understand how a GUI is constructed to understand how things overlap one another. I actually don't know of a really basic tutorial on GUIs that covers component hierarchies. You should read the [url http://java.sun.com/docs/books/tutorial/uiswing/learn/index.html]Swing Tutorial anyway but I've always felt it's based too much on examples.
    In general, though, you have to understand that things are stacked on top of one another in a GUI. This is called a component hierarchy. You have a top-level container with nested components. Each component can be a container which contains other components. Each component is painted from the top of the hiearchy to the bottom, which translates to painting from the back to the front so that what you ultimately see is the result of a lot painted components.
    As an example, imagine a deck of cards. If you look at them from above, you see only the top card. If you fan them out, you see parts of each card and all of the top-most card. A GUI is structured and painted the same way.

  • How a custom component is called when we install a custom component in UCM.

    How a custom component is called when we install a custom component in UCM.
    On what event the component services will be activated and called.
    Suppose i create a Custom service name MULTIPLECHECKIN then this service will be called on what event and where it will be defined to call.

    Saurabh,
    the code is packed in the component (see component\Security Filter\java\Security Filter\ModifyAttributesFilter.java - the first Security Filter is the component name, the other Security Filter is the Java package name).
    What is important:
    - your class must implement the FilterImplementor interface (you will need UCM standard classes - server.zip in your classpath) and its doFilter method
    How the filter is executed?
    - actually, in this case you don't need any new service - you can use the standard 'hook', which is provided by standard checkin services
    - in Component Wizard create a new component, add your compiled class to it (make sure you follow the rules not to end up in classpath issues)
    - in Component Wizard click the 'Java Code' tab. Here you can add a Custom filter called validateCheckinData, which is executed by standard checkin services. If you parametrize the filter to call your class created above, you are done.
    'Working with Content Components' manual (e.g. here: http://download.oracle.com/docs/cd/E10316_01/cs/cs_doc_10/documentation/developer/using_components_10en.pdf) can give you a basic picture. A better resource is Bex Huff's book - I would recommend you to get it, because it has a step-by-step HelloWorld example which can guide you through Component Wizard. I could also send you my own component (send me an email at [email protected]) which implements a filter for user quotas, so you just need to "replace classes".
    As for the other half of your task, searching for the file in the database server will work only if you use database as your storage (ie. install and configure File Store Provider component accordingly). Of course, you could do a search for file in this case - just consider that you will be comparing two BLOBs rather than two relatively short check-sums (most likely strings or arrays of bytes). Besides, it will not work if you use filesystem as your storage.
    Jiri

  • How to drop datafiles in oracle 10g r2

    Hi all,
    Db :oracle 10.2.0.3
    os:solaris 10
    tablespace name: jllp_tabs01
    datafile:
    /ora/data001/jllp/jllp_tbs01_tbl_1.dbf
    /ora/data001/jllp/jllp_tbs01_tbl_2.dbf
    /ora/data001/jllp/jllp_tbs01_tbl_3.dbf
    /ora/data001/jllp/jllp_tbs01_tbl_4.dbf
    its has consisting of 4 datafiles, I need to drop the 2 of them perminently.
    the datafile are having data.
    how to drop the datafiles.
    please suggest me.

    There is no way to drop the datafiles once they are added to the tablespace. The command given by Asif , offline drop won't actually drop the datafile but would be an indication only to Oracle that you would be dropping the entire tablespace after issuing this command. In 11g, there is a command to drop the datafile but only if it's completely empty.
    HTH
    Aman....

  • Cannot drop component on jsp ?

    What I did:
    1. Created a jsp file
    2. Atempt to drop a component on jsp file
    Creator Warning: You cannot drop component on plain HTML documents, only on web form. Mind you, I have created similar jsp files with success before this.
    What is the problem- jsp files created is NOT plain HTML file.

    Hi,
    Restart the IDE and try to drop the components on page.
    regards
    Manjunath J

  • How to drop the datafile in a tablespace

    hi,
    I need to drop the datafile in a tablespace.How to drop the datafile in the tablespace.If iam able to drop the datafile and is it possible to create the datafiles with the same name.could u pls help me out..
    Thanks in advance,
    R.Ratheesh

    sql > alter database <datafile> offline drop ;
    sql > alter database open ;What if the datafile have the segments in it, I believe users will not be able to access them. And system will put the datafile to Recovry mode not drop it.
    Dropping a datafle is possible only in 10G. In 9i you can reduce the size of file below the size of your min extents so that the space wont be allocated from that datafile or you may need to recreate a new tablespace copy all the segments from old tablespace and drop old one.
    Cheers

  • How to drop a schema and load another one?

    I have an interruption during installing the central instance of a SAP Netweaver 04s System. After I restarted the installation I found this message in the Log file.
    <b>ERROR 2006-08-16 16:17:04</b>
    CJS-30109 The Java load in database PDV/liesc1ddbw01 has already been configured. <p> SOLUTION: Drop the schema and load it with a new load before running this installation.
    <b>ERROR 2006-08-16 16:17:04</b>
    CJS-30109  The Java load in database PDV/liesc1ddbw01 has already been configured. <p> SOLUTION: Drop the schema and load it with a new load before running this installation.
    <b>ERROR 2006-08-16 16:17:04</b>
    FCO-00011  The step getJavaLoadType with step key |NW_Java_CI|ind|ind|ind|ind|0|0|NW_CI_Instance|ind|ind|ind|ind|10|0|getJavaLoadType was executed with status ERROR.
    QUESTION: How to drop a schema and load another one?

    Hello,
    I got the similar error....but i did reinstall from o.s. and done the installation again...it was worked successfully..
    if you find out alternate solution for that ...please let us know..
    Regards,

  • How to drop user giving error ORA-03113

    hello,
    I am trying to drop user as follows
    SQL> drop user jbponm_trf cascade;
    drop user jbponm_trf cascade
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    SQL>
    pls suggest me how to drop user.

    Hi Dear,
    Please reconnect from SYS and try again ,Looking there is some problem in your oracle connection or network problem.
    Best Regards
    Faheem latif
    Senior Database Architect
    Genie Technologies (Pvt.) Ltd.

  • How to drop multiple tables in SQL Workshop

    Hi,
    I'd like to drop multiple tables in one time but
    SQL command processor returnes error message: ORA-00933.
    Could you please tell me how to drop multiple tables in
    one time?
    My trial was follows
    Drop table "table1", "table2"
    Result
    ORA-00933: SQL command not properly ended
    Regards,
    Hideki Sakamoto

    Hideki,
    SQL syntax permits you to specify only one table in a DROP TABLE command.
    The SQL Command Processor permits you to run one statement or PL/SQL block per submission.
    So there are at least two ways you can do this. You could either upload or create a SQL script in SQL Workshop which contains your multiple statements:
    drop table "table1"
    drop table "table2"
    or you could execute a single anonymous PL/SQL block in the SQL Command Processor, as in:
    begin
    execute immediate 'drop table "table1"';
    execute immediate 'drop table "table2"';
    end;
    Joel

  • How to set glasspane in Jpanel?

    I want to block all mouse/key input in JPanel, so how to set glasspane in jpanel?

    A glass pane is for the entire frame, not just a JPanel.
    Read the Swing tutorial on [How to Use Root Panes|http://java.sun.com/docs/books/tutorial/uiswing/TOC.html] which has an example on using Glass Panes.

  • How to drop all scheduled jobs

    Hi,
    in 8i, how to drop all oracle scheduled jobs ?
    Many thanks before.

    SELECT job FROM user_jobs;
    exec dbms_job.remove(23);
    To remove all jobs, you can write a pl/sql block to loop through all jobs and remove them.
    http://www.psoug.org/reference/dbms_job.html
    Aalap Sharma :)

  • How to drop unused schema

    How to drop unused schema
    give ur suggestion
    Thanks

    Robert Geier wrote:
    If you are sure it is unused, export the schema to disk (using exp, expdp), then drop it.
    drop user xxx cascade;
    If you are not sure, then you may want to audit to confirm it is not used, and maybe lock the schema for a month before you drop it.Of course locking the schema (actually, locking the user account that owns the schema) doesn't prevent the objects in the schema from being used, it just prevents the owner of the schema from connecting. In a lot (should I say "most"?) systems, the application schemas are owned by "users" that are already locked, because there is never any intent for that user account to actually connect. So trying to determine if a schema is used by locking the owning account and seeing who screams is not going prove much of anything.

  • I don't understand how the drop zone works in Title effects.

    I am having trouble understanding how the drop zone in the "Keynote" title effect works.  I added the title effect to my storyline.  In the inspector, Title tab, I selected the clip in the Event library, in this case a tiff photo.  The thumbnail and clip title display in the inspector, but the clip does not display in the Viewer when I play the storyline even after FCPX has rendered.
    Am I missing something in my understanding of this title effect or is there a problem in FCPX (10.0.6)?  Any ideas or suggestions would be appreciated.
    iMac, 3.4GHz Core i7, 16GB ram, OSX 10.8.2,

    There are two ways in which drop zones are available in the Keynote title template. What Luis has shown you is the normal way in which a title placed over a clip shows you the original clip with the title text. That is called a Final Cut placeholder type of drop zone. Keynote also offers a drop zone to be used as a background choice instead of a gradient or solid as you see in Luis's post. This makes a very nice title effect as you can use any clip for that background. That is what I thought you were refering to when you you said drop zone. Keynote is one of the nicer titles we have available in FCP because of this feature. Glad you got it sorted out.

Maybe you are looking for

  • Browser crashes after update

    I did the latest OS X update and now none of my browsers work. IE crashes immediately when I open it. Safari, Firefox, and Opera crash as soon as I open the FIFA site - fifaworldcup.yahoo.com/06/en/ Not sure what happened, but I'm dead in the water.

  • Which is better, bdc or standard fm?

    In creating a transaction, is it better to use bdc program or calling a standard function module? Points for helpful ideas. Thanks!

  • How to sort/filter tables and lists like in Excel?

    Hi. I used to keep track of my expenses in Excel and had a nice table or list (I forget what it's officially called) with a header row where when I clicked on the header of a particular column it would let me sort and filter- for example, I have a co

  • Calendar Invite Attendee

    Hello! I just replaced my Pearl with an 8900 Curve, but am having problems sending and receiving calendar invites as they are either not arriving at all or arrive just as text messages. This never used to happen on my Pearl a few days ago. Does anyon

  • Error Code 8224 Ldifde Exchange 2010 installation failure

    Hi, here is a problem I have been bashing my head with for about a week. I am transitioning to Exchange 2010 from 2003. I have two DC's running Windows Server 2003 Sp2, one of which is the Exchange 2003 server. I have just brought online a windows 20