Help draggin + dropping

Does any1 know how to drag + drop paint objects using mouse events, not the import statement dnd

Hello i am back i showed you the applet one here is a demo of a app one you just have to add the extra stuff you want in the code and you can use that applet on i showeed you to add the extra stuff well here you go hope this helps
the first class
import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
public class aa1 extends JPanel implements MouseMotionListener, MouseListener {
Image ball, ball1;
int x;
int y;
int width1 = 200;
int height1 = 200;
boolean bowl;
public aa1() {
super();
Toolkit kit = Toolkit.getDefaultToolkit();
ball = kit.getImage("gem2.gif");
ball1 = kit.getImage("gem1.gif");
addMouseMotionListener(this);
addMouseListener(this);
public void mouseMoved(MouseEvent me) {}
public void mouseDragged(MouseEvent me) {
x = me.getX();
y = me.getY();
repaint();
public void mouseClicked (MouseEvent me) {}
public void mouseEntered (MouseEvent me) {}
public void mousePressed (MouseEvent me) {}
public void mouseReleased (MouseEvent me) {}
public void mouseExited (MouseEvent me) {}
public void paintComponent(Graphics comp) {
Graphics2D comp2D = (Graphics2D) comp;
comp2D.drawImage(ball1, 0, 0, 500, 500, this);
comp2D.drawImage(ball, x, y, width1, height1, this);
the second class witch is the container to hold the first class here you go
import java.awt.*;
import javax.swing.*;
public class aa2 extends JFrame {
public aa2() {
super("just a test");
setSize(500, 500);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
aa1 a = new aa1();
Container pane = getContentPane();
pane.add(a);
setContentPane(pane);
setVisible(true);
public static void main(String[] args) {
aa2 aa = new aa2();
ps
see you and hope it helps

Similar Messages

  • Help i drop my ipod touch 4g on water. what can i do?

    Help i drop my ipod touch 4g on water. what can i do?

    Do not try to turn it on or charge it.
    Let it dry for a week or two, then try.

  • Need help with drop down list in parameters

    Hi All,
    I have the following data set:
    DEPT1     DEPT2     DEPT3 DEPT4
    Commissioner's Office     Finance     Accounting     Accounts Payable
    Commissioner's Office     Finance     Accounting     Fiscal Analysis & Repo
    Commissioner's Office     Finance     Accounting     
    Commissioner's Office     Planning,Asset Mgt     Asset Management     Inventory & Tracking
    Commissioner's Office     Planning,Asset Mgt     Asset Management     Mobility & Congestion
    Commissioner's Office     Planning,Asset Mgt     Asset Management     Roadway Safety
    Commissioner's Office     Planning,Asset Mgt     Asset Management     
    Commissioner's Office     DesignProj Mgt & Tec     Bridge Dsgn Insp Hyd     
    In plus i have four parameters with searchlight options, the problem is when i select "Finance" from DEPT2 and in the next selection level i'm seeing all the departments "Accounting,Asset Management and Bridge Dsgn Insp Hyd" insted of just "Accounting". What i want is if i select a department in DEPT2, in the next drop down list(DEPT3) i want to see only the departement corresponding to the one i selected in dept2. Please need help.
    Thanks

    Hi
    First of all you need to be using Discoverer 10g or 11g Plus not 9.0.4. Assuming you have the right version you need to present the parameters in the correct order. You can change the order on the parameters screen by selecting Tools | Parameters from the toolbar. You then use the Move Up and Move Down buttons to place them in the right order so that DEPT1 is offered first, followed by DEPT2, then DEPT3 and then DEPT4.
    Next, you need to check the radion button on the bottom of the right-hand side that allows linking of parameters then you make DEPT2 dependent upon DEPT1, with DEPT3 dependent upon DEPT2 and so on.
    While this works without hierarchies it works best when you have a hierarchy in place and even better when there is a composite index on the 4 items.
    Best wishes
    Michael

  • Help with drop-in text animation

    Hi Folks,
    I'm trying to create a specific text animation, but I'm having a little difficulty.  I'd like to have the text drop in in a random order into its final spot.  I can get close using the text drop-in animation, but I'd really like the 'source' of the text dropping in to be from a single point.  Picture a watering can pouring the letters out and they randomly fall into their correct spot in a phrase. The default look of the drop-in animation is that each character drops from its corresponding spot in the phrase. I've played with changing the tracking, using the 'before' setting and managed to squeeze the space that the text is dropping from, but that causes the letter to appear to move after they've already landed.  You can see a rough draft here:  http://www.c2-it.com/clients/a/textdrop.mov
    Does anyone have any suggestions on how I can get closer to what I'm looking for?
    Thanks,
    CJ

    Todd, thanks for the reference to the tutorials.  They helped me understand a little more how the animators work.
    Mylenium, I'm still a little confused on your approach.  I've got the base text layer and added an animator for opacity.  I set it for random and that works fine, the letters randomly appear and complete the phrase.  For the 'pouring in' part, I added a second text layer and animated the position property, but the text still originates from its original place in the phrase.  I can't get it to originate from a single point.  Also, I'm not even sure I understood about using multiple selectors for the 1st layer.  Just using the animator for opacity with a random setting seems to provide the correct 'ending' of the animation.
    Thanks Again,
    CJ

  • Help with Drop Menus

    I am designing a site that has multiple pages of images.
    (Photographer website) I added a drop menu to keep the site
    organized but I am now running into problems. Because of the
    multiple pages, whenever she wants to upload pictures I have to
    adjust the drop menu on like 15 pages. So I did the site over using
    frames thinking this would help. But no. Now the frame cuts the
    drop menu off.
    So my question is. Is there a way to create a link or
    javascript that I can link to on each page and then only edit that
    one item. So when I go to that link/script and edit it, it will
    just link to all other pages that contain that link/script. I don't
    know if this is an easy fix, but I have just been pulling what
    little hair out I have.
    Thanks in advance.
    Kevin

    Investigate using DW's Library items, or Templates, or
    ordinary Server-side
    includes. It's the only way to do it.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Chester_22" <[email protected]> wrote in
    message
    news:f8cqap$gra$[email protected]..
    >I am designing a site that has multiple pages of images.
    (Photographer
    >website)
    > I added a drop menu to keep the site organized but I am
    now running into
    > problems. Because of the multiple pages, whenever she
    wants to upload
    > pictures
    > I have to adjust the drop menu on like 15 pages. So I
    did the site over
    > using
    > frames thinking this would help. But no. Now the frame
    cuts the drop menu
    > off.
    >
    > So my question is. Is there a way to create a link or
    javascript that I
    > can
    > link to on each page and then only edit that one item.
    So when I go to
    > that
    > link/script and edit it, it will just link to all other
    pages that contain
    > that
    > link/script. I don't know if this is an easy fix, but I
    have just been
    > pulling
    > what little hair out I have.
    >
    > Thanks in advance.
    > Kevin
    >

  • Help with drop create and update table

    Sir/Madam,
    I have joined 5 tables and selected some columns ,then I need to update some columns in that. After updating I need to create a report with the new column values.
    To do this my method is to create temp table with the select statement then update the temp table , use this temp table for the report and then drop the temp table.
    Is there anyother way to do this ??
    Can I create a cursor and update the cursor column ??
    Does dynamic sql always be created as procedure ??

    Hi,
    you need to understand how eventing works in BSP and MVC architecture. Pls refer to the below link for a basic understanding of how BSP works - View, Controller and Model class concepts.
    http://www.sapdev.co.uk/webapps/bsp/washome.htm
    For your requirement -
    1. you need a view on which you will create a drop down list UI element and a table view element
    2. you will need to create a contoller class - this will be used to handle the event that will be triggered   when user selects an entry from drop down list
    3. you will need a model class in which you will write the business logic to retrieve employees of selected department.
    Pls search this forum or blogs for - data binding with BSPs, Table View. Pls read these concepts and try to develop your requirement. You can come back to this forum if you face any issues during development.
    hope this helps.

  • Help Recreating Drop Shadow Effect from Clipping Mask

    A few months ago I created the image attached. Today for the life of me I cannot create a similar effect, where the drop shadow of the text comes from the clipping mask. Everytime I try to follow the same steps and layer styles I keep getting a normal black drop shadow not a drop shadow that comes from the clipping mask like in my example. Help please I am driving myself crazy!!!

    Thanks JJMack and PCTGraphic !
    PCTGraphic converting the text layer to a smart object is what I seemed to be missing (and what I believe I did in the attached picture as well). Thanks for the reminder!
    JJMack I really appreciate your answer as well (there's always more than way of doing things), but I know I didn't use a vector mask originally.  Unfortunately, I do not know how to add text to a vector mask.  I would like to learn how to do it your way, I will work on that (the screen shot will help, thank you)!

  • HELP! Dropping of Type not possible Don't try this at work!

    Please Help me to drop the types I Created here:
    create or replace force type TControlRuleNode as Object(
    RuleOperator number(10),
    ChildCol TControlRuleNodeList);
    create or replace force type TControlRuleNodeList as table of ref TControlRuleNode ;
    alter type TControlRuleNode compile;
    alter type TControlRuleNodeList compile;
    Can't drop the List because it has dependents ( TControlRuleNode ).
    Can't drop TControlRuleNode because it has dependents (list).
    Can't replace. Can't drop. Can't create.
    Can't drop database either.
    Any Ideas ? PLEASE ?

    Just to prove this works...
    SQL> select object_name, status
      2  from user_objects
      3  where object_type = 'TYPE'
      4  and object_name like 'TCONTROLRULE%'
      5  and subobject_name is null;
    OBJECT_NAME                    STATUS
    TCONTROLRULENODE               VALID
    TCONTROLRULENODELIST           VALID
    SQL> drop type TCONTROLRULENODELIST force
      2  /
    Type dropped.
    SQL> select object_name, status
      2  from user_objects
      3  where object_type = 'TYPE'
      4  and object_name like 'TCONTROLRULE%'
      5  and subobject_name is null;
    OBJECT_NAME                    STATUS
    TCONTROLRULENODE               INVALID
    SQL> drop type TCONTROLRULENODE       
      2  /
    Type dropped.
    SQL> select object_name, status
      2  from user_objects
      3  where object_type = 'TYPE'
      4  and object_name like 'TCONTROLRULE%'
      5  and subobject_name is null;
    no rows selected
    SQL>In general Oracle's TYPE implementation does not respond well to the sort of recursion you have tried to implement. Everything has to be valid at the end of the SQL statement - there's none of the "let it all hang loose until runtime" casualness you might have come to expect from working with other OO languages.
    Cheers, APC

  • PREMIRE EL, 11. NEED HELP WITH DROPPING CLIP. SO FAR 3 1/2 HOURS.  :(

    i HAVE A LARGE VIDEO CLIP THAT IS IN VIDEO/AUDIO #2.  I CAN NOT DRAG AND DROP IT INTO VIDEO/AUDIO #1 IN BETWEEN CLIPS. I HAVE TRIED EVERYTHING. PLEASE HELP ME.  BARB

    barbe1957
    Without seeing your Timeline structure, I offer this thought for now. If you want to post a screenshot of the track situation, that would be helpful.
    Why can you not drag and drop the large clip from Video/Audio 2 Video/Audio 1 - messes up the existing Timeline or just will not move or something else?
    Select the group of clips that are now in the place where you want the Video/Audio 2 material to be. Then drag the selection as a group out of the way.
    Drag in the Video/Audio 2 material to Video/Audio 1. Move the previously moved group back to wherever you want it.
    What is the duration of this large Video/Audio 2 clip?
    We will be watching for your follow up in the morning.
    Thanks.
    ATR
    Add On...Typically as you hold down the Alt key of the computer main keyboard as you add a clip to an existing Timeline to avoid disturbing it.

  • Has New Router or Antenna Helped WiFi Dropping Issues?

    Hi, I'm helping someone get setup with their brand new MacBook (2.26Ghz White). It's only 3 days old, but could not reliably connect to their wireless network anywhere except in the same room as their router. They have a Netgear WGR614 router.
    When in the room with the router, everything works great, but once out in the main living room (just down a very short hallway), they get constant dropouts or the computer won't connect at all. I would say it connects maybe 10% of the time. But an old PC laptop, my Android phone, and the living room TiVo all connect perfectly and never drop out, no matter where we walk.
    I've read through some of the threads, and most are concerning older machines. But I spent a couple hours with 2nd level Apple tech support today, and they concluded after much testing that it may be hardware related. So we ended up taking it back to day and swapping for a completely new machine (instead of having the Airport card replaced). But this machine has the SAME EXACT PROBLEM!
    My signal strength in the main area averages around -60 to -70, which should be fine to connect. And it appears to be on a pretty clear channel.
    - So, if it's not hardware related (or if all MacBooks will have this same issue), I'm wondering what other solutions people have tried that has given some success?
    - Anyone try extension antennas for their routers? If so, which work well and are affordable?
    - How about specific routers known to work well with Mac (better than Netgear)? The Airport Extreme BS is just too expensive for what it offers.
    THANKS! If we can't get this working in this small, basic setup, we'll probably have to try something other than Mac unfortunately.

    koolbreeze7 wrote:This is getting pretty annoying. Had an Arris tg862g, and up unitl a month or so ago problems with Wifi. Contacted customer care, modem/router bad. Tech came out replaced with, I think there newest TG1682g and everthing great. All areas of the house and fast! Lasted about five days, now Wifi dropping out. But what's really ticking me off, is the Xfinity hotspot broadcasting just fine. Hadn't gotten around to turning it off yet. Hey Comcast, what gives!!!Your decision on the public hotspot on your equipment...me ?  I turned it off....Have you used a wireless scanner to see if you are getting stomped on by surrounding wifi APs?   Channel congestion can impact your system.... 

  • Help regarding drop table information

    hello all,
    i want to know is there any data dictionary present who maintainted the droped table history with terminal number so i can easily know who dropped perticular table .
    any help appriciated
    Message was edited by:
    Pankaj M

    In 10g onwards you can investigate the recyclebin (if not tuned off and tables are not dropped with purge clause). It might contain at least some information you need:
    SQL> desc recyclebin
    VIEW recyclebin
    Name                                      Null?    Type                       
    OBJECT_NAME                               NOT NULL VARCHAR2(30)               
    ORIGINAL_NAME                                      VARCHAR2(32)               
    OPERATION                                          VARCHAR2(9)                
    TYPE                                               VARCHAR2(25)               
    TS_NAME                                            VARCHAR2(30)               
    CREATETIME                                         VARCHAR2(19)               
    DROPTIME                                           VARCHAR2(19)               
    DROPSCN                                            NUMBER                     
    PARTITION_NAME                                     VARCHAR2(32)               
    CAN_UNDROP                                         VARCHAR2(3)                
    CAN_PURGE                                          VARCHAR2(3)                
    RELATED                                   NOT NULL NUMBER                     
    BASE_OBJECT                               NOT NULL NUMBER                     
    PURGE_OBJECT                              NOT NULL NUMBER                     
    SPACE                                              NUMBER             

  • URGENT HELP PLEASE - drop index hangs on SAP

    Hi all,
    OS = Linux
    DBVersion = Oracle10.2.0.2
    Need some urgent help advise please on how to get around this problem.
    On a SAP system, am trying to drop six indexes, largest is 300MB and smallest is 50MB.
    I tried running drop index sapusername.index_name on the 50MB index via SQL*Plus and it seems to be taking forever. Can anyone please suggest if there is anything I can check on the database on why it is taking such a long time?
    I can leave it to run overnight but worried that when I come back the next day, it will still be hanged. Is there any quick way of dropping the index, .i.e. drop immediate ... :-)
    Am not using SAP's BRTOOLs as it is also hanging from there and the SAP-ADMIN had approved for the DBA to drop it from our end instead.
    Any response and advise on this will be very much appreciated.
    From Google'ing, I found some that mentioned that the fault could be because of the existence of the constraints on the table that I am dropping the index of.
    Checking the table, it has 17 SYS_ named constraints. None of these constraints have INDEX_NAME that refers to the indexes that am dropping.
    Should I disable the constraints and then run the drop index again?
    Thanks in advance.
    Edited by: user649596 on Apr 13, 2010 11:49 PM

    Should I disable the constraints and then run the drop index again?NO, certainly not !!
    Ask SAP Support on what methods you should use to diagnose the "hang" and what your next step(s) should be.
    Hemant K Chitale

  • I need help with drop down lists

    I have a form that does not have lots of space and I want to use drop down lists to fill in specific information that describes site conditions.  The problem I have is that the drop down list is only set up for a single line and that is not enough space for what I want in the drop down list.  In other words, I have items that are several sentences.   I have seen some descriptions of creating a drop down list that then fills in a text box that has multiple lines.  Unfortunately, that is not an ideal solution for me.  I just want the drop down list to select a single phrase.  Here is an example of what I want to be able to select in the drop down.
    The water heater spilled flue gases in excess of 5 minutes under worst case conditions.  The combusiton testing was completed with in 30 days of the invoice submittal. 
    The form does not allow me to create a field that goes all the way across the page so it needs to look something like this:
    The water heater spilled flue gases in excess of 5 minutes
    under worst case conditions.  The combusiton testing was
    completed with in 30 days of the invoice submittal.
    Any help is greatly appriciated.

    Thanks for responding.
    I have three items that are very similar in length and text for each drop down.  There are 9 drop downs right now.  I am using the drop downs to fill in a form that is used by several people and I want to keep things as simple as possible.  Associated with the drop down already is a check box.  When the check box is checked, it fills in a text box with a score (1 point, 5 points, etc).  That score then tallys for a total with all the other scores in another text box.  Using a drop box to fill in a text box is just getting to busy and than I have to distinguish each drop down item so it is clear which text you are selecting.

  • Please help - simple drop down box

    i am very new to this - i have just opened the app for the first time - i have to create this form by tomorrow!!
    I have a simple list in access - it contains 15 fields in the table - very simple.  I need EVERY drop down box on the page to ref. this table to populate the list - which changes on a daily basis.  There will be a total of 35 drop down boxes on the form - all pointing to the exact same CHANGING list.
    PLEASE HELP!!!

    You can enter the sales tax rate for each province as the export value and
    then use the drop-down field directly in your calculations.
    On Thu, Feb 5, 2015 at 6:06 PM, jennam90934439 <[email protected]>

  • Help i dropped my iphone 4 in water

    so last night i dropped my iphone in a sink full of water. i got it out as soon as it hit the water but my phone did this really weird screen and shut off. i cried a little then found some rice and took the back off and the battery and covered it in the rice. so i take it out this morning and put the battery back in and tried cutting it on. i plugged it up and tried all that come on was the start up apple screen and then it goes blank again PLEASE HELP ME!!! thanks

    karaleighann0226 wrote:
    ...and took the back off and the battery and covered it in the rice...
    Unfortunately, you permanently forfeited any chance of getting it serviced or replaced by apple when you opened it.
    Find a competent 3rd party repair shop or buy a new phone.

Maybe you are looking for

  • Data transfer transform with Oracle

    I am using a data transfer transform within a simple data flow. Source --> Query --> data transfer --> two queries --> two target tables. The transfer type is set to Table. The table is being created in a oracle 9i datastore. I have the drop and re-c

  • Column formatting based on grouping data value- advanced data grid

    Hello Everyone, I am using advanced data grid to display hierarchial data nested upto depth 4. I have to color the leaf nodes conditionally based on  the grouped column value. Say for Eg., If the data is something like Company      Manager          

  • BRFplus: Standard /BOFU/ applications

    Hello, We have a lot of applications /BOFU/ in our standard installation of BRFplus. In the application /BOFU/FDT (description: BOPF Add-Ons for FDT) we have a new class expression (retrieve BO data). What is the origin of these applications? Are the

  • How do I re-install Skype professional?

    I recently had to reformat my hard drive. How can I re-install skype professionl in order to use my existing subscription?  When a try to re-install it I am asked to extend my subscription which still has 6 months on it.

  • Do you have a favorites button like internet explorer?

    I want to be able to click one button to show all my favorites