Problem with swapDepth with press event

Hi guys,
Im getting confused with swapDepth for navigation buttons. I
have a button mc's that use this for stacking but something weird
happens on just the press event. I have tried to take away the
press event but the problem makes it more difficult. This was the
script i tried to tweak on the button in order to swapDepth with
the mc next to it:
on (press, release, releaseOutside) {
_root.x +=2;
_root.bar_mc.swapDepths(_root.x);
_root.red_mc.swapDepths(_root.bar_mc);
trace("bar: " + _root.bar_mc.getDepth());
trace("red: " + _root.red_mc.getDepth());
..where the bar_mc is just an border mc so that the clicked
button will appear on top of it as well as the rest of the button
mc, my problem comes when you just perform press event w/o
releasing it, all the buttons appear on top of the border mc, it
only becomes normal after releasing the mouse. I mean users will
notice this so I cant figure out how to tell all unclicked buttons
not to appear on top of border mc on press event. Did this happened
to anyone? I would gladly appreciate any suggestions that you can
give. You can see the FLA version here ->
http://www.janethsieh.net/flash/swapDepth.fla
_scriptRookie

hi kglad, thanks for looking into my problem, i just actually
need solve the problem during press event. when i press any button
w/o releasing it all the other buttons appear on top of bar_mc,
what i want it every time i press a button only that button should
appear on top. open this swf to see what I mean ->
http://www.janethsieh.net/flash/swapDepth.swf

Similar Messages

  • Hi my mac book pro is having some problem with mouse , With out my actions it's automatically running for example If I open some site the arrow is automatically pressing every where if u don't mind can u suggest me what I have to do

    Hi
    I am facing some problem mouse arrow with out my actions it's automatically running for example If I open a some site the arrow mark is going every where and automatically pressing and the particular sites are opening if u don't mind can u suggest me what I have do

    If you can still access the machine and haven't wiped the drive, open the Mac App Store, log in to your Apple ID, and try to download Mavericks from there. If it works, make a bootable USB from the
    Mavericks installer (google how to do this). Then boot to the USB wipe the drive and install Mavericks clean. And since it shoudl be associated with your Apple ID at that point you shouldn't have any issues.

  • Problem with TrayIcon and mouse events

    Hi,
    I am trying to listen for a mouseEntered event on a TrayIcon.
    This is the code i am using:
    final TrayIcon icon = new TrayIcon(getImage(), "tray icon");
    final SystemTray tray = SystemTray.getSystemTray();
    try {
       tray.add(icon);
    }catch (AWTException e) {System.out.println("TrayIcon could not be added.");return;}
    icon.addMouseListener(new MouseAdapter() {
    @Override
    public void mouseEntered(MouseEvent e){
       System.out.println("works");
    }});The icon is correctly shown in the tray bar, but the mouse entered event is not working.
    I have to say that i am using the exactly same code to achieve the same effect on a JButton and it works without any problem.
    Is there anything wrong?
    Thanks,
    Nite

    is there a way to request my thread to be moved into Swing section? Well, the idea is to post the question in the proper forum in the first place.
    yes, but i didnt find anything related to my problem.Really, I found posted examples of using a MouseListener.
    Does your code work for other events or is the problem only related to mouseEntered() events (which may not be supported, I don't know since I don't have the proper API to use TrayIcons)?
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Then maybe others can test your code or see something else wrong.

  • "A problem was detected with your serial number"

    HELP! Everytime I open Dreamweaver 8, Fireworks, or any other
    software package I get the message "A problem was detected with
    your serial number." It then gives me the option to retype my
    serial number. After I type in the serial number I get the little
    checkmark like everything is great. But when I press "Continue" it
    comes back with that same message.
    I called Adobe support and they said it sounded like my
    registration key got corrupted and that I would have to follow
    TechNote 4e7826b7 which steps you through removing Studio from the
    computer and deleting orphaned files. I've done this TWICE and when
    I tried to call Adobe technical support, they sent me to customer
    support (with a long hold time in between) and then they sent me to
    technical support. When I mentioned I had already passed this
    route, the Adobe employee said she would inform the supervisor and
    they would get back to me. Guess what. Never happened.
    Surfice it to say I'm still getting the message and I don't
    want to uninstall a third time because I know the outcome. Does
    anyone have any suggestion? Pleeeeeeeease!
    Thanks,
    Glenn Lauderdale

    Same problem here. I just hit 'cancel' and the program opens
    fine.
    Adobe posted a hot fix that allegedly fixes the problem. I've
    run the thing several times, and the annoying box still shows up.
    You can find it here:
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?event=view&id=KC.tn_18976&extid=tn_18 976&dialogID=53494061&iterationID=1&sessionID=4830e245130c574b2b37&stateID=1+0+53482525&mo de=simple
    I'll keep checking to see if any fix comes up.
    John

  • The problem I have since I upgraded to Mavericks version 10.9.1 The problem appears only with Mail not with other programs, not even with my browser. When I try to zoom the text of an e-mail I received or sent , I can no longer use the keys Command   to e

    the problem I have since I upgraded to Mavericks version 10.9.1
    The problem appears only with Mail not with other programs, not even with my browser.
    When I try to zoom the text of an e-mail I received or sent , I can no longer use the keys Command + to enlarge the text, although I can reduce it with Command -.
    As I have a problem with my eyes, This is a serious matter for me.
    When I write an e-mail, if I select text and press Command +, it just displaces the text to the right.
    Now, my husband has a USB keyboard. If he connects it to my computer, his regular Command + does not work either, but  he uses the extended keyboard, then it works. Unfortunately, he needs it for a musical application which does not work with a wireless keyboard.

    Firefox 3.6.4 and 3.6.6 use a process called, "plugin-container.exe" which was using up most of my CPU when I opened up multiple tabs that contained Adobe Flash files, and caused Firefox to lock up.
    My solution was to use Firefox 3.5.10 which you can get from the Mozilla website at [http://www.mozilla.com/en-US/firefox/all-older.html]
    I am using Adobe Flash 10.1.53.64 without any problem in this version of Firefox. Check the release notes, I believe it contains all the latest security fixes in "Firefox 3.6.4".
    Hopefully, they will fix Firefox 3.6 in the next version (e.g. Firefox 3.6.7), until then you should probably use "Firefox 3.5.10".

  • Problem on photocopier with HP Deskjet F4185

    I have an HP Deskjet F4185 with an single cartridge mode (Black), when I try to copy my printed document with black by pressing the button on the printer that indicate black, my printer does nothing.
    I even tried using the HP solution Center, but when I click the Back Copy button on the GUI, the application always says the printer is busy even though I havent printed anything yet. This problem is already getting on my nerves, I already update the drivers to the latest version to my Operating system (Windows 7 64bit), even tried uninstalling and installing it again but the problem still presist.
    Can anyone help me?

    Can you scan with the printer?
    007OHMSS
    I was a support engineer for HP.
    If the advice resolved the situation, please mark it as a solution. Thank you.

  • Specifying a circle with 2 mouse presses

    Hi,
    I'm trying to create an applet that allows the user to specify a circle with 2 mouse presses. I'd like the 1st point to represent the circle's centre and the 2nd to be any point on the periphery.
    Creating a mouse press event handler is a given obviously within the applet. I think I'm going to need to create a variable to store the count of the mouse presses (i.e. so that I know when there've been two and the circle can be created).
    Can anyone tell me what the basic logic would be to actually create the circle based on the 2 mouse presses?
    Thanks.

    Can anyone tell me what the basic logic would be to
    actually create the circle based on the 2 mouse
    presses?
    implements MouseListener{
      int centerX = 0;
      int centerY = 0;
      int radius = 0;
    public void paint(Graphics g){
      g.drawOval(centerX-radius, centerY-radius,
                 centerX+radius, centerY+radius);
    public void mousePressed(MouseEvent me){
      centerX = me.getX();
      centerY = me.getY();
    public void mouseReleased(MouseEvent me){
      //a line from the center
      //length of x
      int x = me.getX()-centerX;
      //length of y
      int y = me.getY()-centerY;
      //a2 + b2 = c2
      radius = sqrt(pow(x, 2)+pow(y, 2));
    }i think this will work.. I used mousePressed and mouseReleased instead of two clicks.. but you can alter this if you like of course.. im not that very sure of the radius calculation, but i hope you get my point :)

  • Problems with files with no types or creator infos

    I installed Ffmegx which converts videos in differents formats.
    In order to work, that software needs extra files (mencoder, mplayer, mpeg2enc).
    After I downloaded them, the two first ones were seen as Unix Executable files
    by Mac OSX, the third is seen as a text file, and therefore cannot be used by Ffmegx.
    When I go see the type-creator infos for the 2 first ones, there is no infos for type and creator
    and there are ????? signs elsewhere.
    I am sure that I would get everything working if I only knew what to fill in (using type and creator
    changer). Anynone knows what the extensions should be ?
    P.S. This problem happens often with Mac files from internet, they loose their identity somehow on the way. Sometimes the file is downloaded as text (code) in the browser window itself ! Which I found out can be avoided by pressing ALT while clicking download. Very strange problem which happens both with Safari and FireFox. But pressing ALT doesn't help after all, because the file becomes a text file anyway, not associated with any program. Useless.
    Thanks
    louis

    Start by doing the following:
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger and Leopard.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer. Now restart normally.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    Next, clear the LaunchServices database:
    Rebuild LaunchServices Database
    For Tiger users
    Open the Terminal application in your Utilities folder. At the prompt paste in the following command in its entirety:
    /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServic es.framework/Support/lsregister -kill -r -domain local -domain system -domain user
    Press RETURN.
    For Leopard users
    Open the Terminal application in your Utilities folder. At the prompt paste in the following command in its entirety:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
    Press RETURN.
    Now, OS X no longer uses type and creator codes to identify file types. It's all done from file extensions. OS X maintains a database of associations between documents and the applications that created them. The exception is an application which is identified by the ".app" file extension. Your system has apparently become corrupted in some way that has broken these associations, so the above is an effort to see if things can be straightened out.

  • Problem in Safari with pull-down menus

    My current version of Safari, Version 7.0.3 (9537.75.14), is the buggiest software I have ever had from any Apple--bar none.  The problem is dealing with pull-down menus.
    The first such problem is in dealing with pull-down menus on websites.   Some of these menus are quite long.   On one particular menu the choice that I routinely need is way down near the bottom.   Routinely Safari stops scrolling before I can get that far down the pull-down menu.
    And, always, when Safari stops scrolling on a pull-down menu on a webpage, it refuses to allow me to scroll down again.   To get the webpage's pull-down menu to operate then, I have to re-load the webpage.   That is a big problem for one website that I MUST use.  This website has three pull-down menus on one webpage.  Because Safari always locks up on the first menu, this crucial website is unusable in Safari.  I have to use Firefox for this absolutely essential website.
    And Safari has trouble with one of its own pull-down menus.  This is the PDF menu in the printer window.  Not always, but too often, when I pull down that menu to print to PDF, Safari crashes.   I have to wait for a dialog box to come up and click "send report to Apple" in order to get Safari to reopen.   I don't know how many such reports I have sent to Apple.  I get the feeling that Apple is not listening.
    Does anyone have any suggestions for these problems?  TIA

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    For this step, the title of the Console window should be All Messages. If it isn't, select
    SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar at the top of the screen.
    In the top right corner of the Console window, there's a search box labeled Filter. Initially the words "String Matching" are shown in that box. Enter the name of the crashed application or process. For example, if iTunes crashed, you would enter "iTunes" (without the quotes.)
    Each message in the log begins with the date and time when it was entered. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    ☞ The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, select
    DIAGNOSTIC AND USAGE INFORMATION ▹ User Diagnostic Reports
    (not Diagnostic and Usage Messages) from the log list on the left. There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points down. You'll see a list of crash reports. The name of each report starts with the name of the process, and ends with ".crash". Select the most recent report related to the process in question. The contents of the report will appear on the right. Use copy and paste to post the entire contents—the text, not a screenshot.
    I know the report is long, maybe several hundred lines. Please post all of it anyway.
    ☞ If you don't see any reports listed, but you know there was a crash, you may have chosen Diagnostic and Usage Messages from the log list. Choose DIAGNOSTIC AND USAGE INFORMATION instead.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    ☞ Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.

  • Problem in tilelist with dataprovider.

    I have a problem in tilelist. with the dataprovider a get the
    message error
    ArgumentError: Error #2025: The supplied DisplayObject must
    be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    if i delete the images from the last added to the first one i
    have no prob but if i want to delete from the middle i get the
    message error th sode that i use is
    <mx:TileList id="tileList"
    dataProvider="{imgData}"
    columnCount="4"
    columnWidth="222"
    rowCount="2"
    rowHeight="194"
    themeColor="haloSilver"
    verticalScrollPolicy="on"
    x="0" y="415" width="100%">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox horizontalAlign="center"
    verticalAlign="middle" width="222" height="194"
    verticalScrollPolicy="off" horizontalScrollPolicy="off" >
    <mx:Image id="img" width="165" height="126"
    maintainAspectRatio="true" source="{data.asset}" />
    <mx:Label id="txt" text="{data.title}"/>
    <mx:Button id="del" label="Delete"
    click="outerDocument.deleteSnapShot(event)"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:TileList>
    the function to add the image is :
    public function addImgToTile(bm:Bitmap):void{
    var bm1:BitmapData = Bitmap(bm1_source.content).bitmapData;
    var bitmap:Bitmap = new Bitmap(bm1);
    var vo:MyVOBm = new
    MyVOBm(bitmap,formatTime(inStream.time));
    imgData.addItem(vo);
    And the function to delete the image is:
    public function deleteSnapShot(ev:Event):void{
    imgData.removeItemAt(tileList.selectedIndex);
    tx for your help

    tx Amy for your help here i give you the code that generate
    the image from streaming video
    <mx:Canvas id="videoHBox" horizontalScrollPolicy="off"
    verticalScrollPolicy="off" backgroundColor="#000000" width="456"
    height="284" y="37">
    </mx:Canvas>
    <mx:Button x="464" y="188" label="In" width="48"
    id="btnIn" click="addStart(inStream.time);" enabled="true"
    visible="true" useHandCursor="true" buttonMode="true" toolTip="Add
    Start Image (shotcut Home)"/>
    <mx:Button id="Btn_add_action" x="464" y="221" label="Add
    Screenshot" click="addImgToTile(bm1)" useHandCursor="true"
    buttonMode="true" toolTip="Add Clip (shotcut insert)"/>
    <mx:TileList id="tileList"
    dataProvider="{imgData}"
    columnCount="4"
    columnWidth="222"
    rowCount="2"
    rowHeight="194"
    themeColor="haloSilver"
    verticalScrollPolicy="on"
    x="0" y="415" width="100%">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox horizontalAlign="center"
    verticalAlign="middle" width="222" height="194"
    verticalScrollPolicy="off" horizontalScrollPolicy="off" >
    <mx:Image id="img" width="165" height="126"
    maintainAspectRatio="true" source="{data.asset}" />
    <mx:Label id="txt" text="{data.title}"/>
    <mx:Button id="del" label="Delete"
    click="outerDocument.deleteSnapShot(event)"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:TileList>
    variable:
    private var videoHolder:UIComponent = new UIComponent();
    [Bindable] public var imgData:ArrayCollection = new
    ArrayCollection();
    init :
    nc = new NetConnection();
    nc.addEventListener(NetStatusEvent.NET_STATUS, netStatus);
    nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
    netSecurityError);
    nc.connect(Srv_Name);
    videoHolder.setActualSize(Playing_Video_width,
    Playing_Video_height);
    Playing_Video = new Video(Playing_Video_width,
    Playing_Video_height);
    videoHolder.addChild(Playing_Video);
    Playing_Video.x = 0;
    Playing_Video.y = 0;
    videoHBox.width = Playing_Video.width;
    videoHBox.height = Playing_Video.height;
    videoHBox.addChild(videoHolder);
    functions:
    public function addStart(timecode:Number):void{
    var bm:Bitmap = copyBitmap(videoHBox as
    UIComponent,timecode,"start");
    bm1 = bm;
    img_start_time.text = formatTime(timecode);
    start_time = timecode;
    public function addImgToTile(bm:Bitmap):void{
    var bm1:BitmapData = Bitmap(bm1_source.content).bitmapData;
    var bitmap:Bitmap = new Bitmap(bm1);
    var vo:MyVOBm = new
    MyVOBm(bitmap,formatTime(inStream.time));
    imgData.addItem(vo);
    private function
    copyBitmap(source:UIComponent,timecode:Number,origin:String=''):Bitmap
    try{
    var bmd:BitmapData = new BitmapData( source.width,
    source.height );
    bmd.draw(source);
    corectImg = false;
    catch (err:Error){
    this.setFocus();
    inStream.seek(timecode);
    if (origin == "start") setTimeout(addStart,750,timecode);
    return new Bitmap(bmd);
    public function deleteSnapShot(ev:Event):void{
    imgData.list.removeItemAt(tileList.selectedIndex);
    and the MyVOBm class is :
    package components
    import flash.display.Bitmap;
    [Bindable]
    public class MyVOBm
    private var _asset:Bitmap;
    private var _title:String;
    public function MyVOBm(asset:Bitmap, title:String)
    this.title=title;
    this.asset=asset;
    public function set title(title:String):void{
    _title=title;
    public function get title():String{
    return _title;
    public function set asset(asset:Bitmap):void{
    _asset=asset;
    public function get asset():Bitmap{
    return _asset;

  • Problem with projects with transitions

    Hi everyone,
    I have a (iMac 27-inch mid 2011) with 10.7.5. When I am working with a project in iMovie and in this project I insert transitions (effects into photos), I have a problem when I make export (share) of the project: at 4 minutes the iMovie makes freeze and it doesn't response. If I delete the transitions then the process works fine. The hard drive is empty (more that 800Gb empty)
    I updated all the apps, I deleted (with AppCleaner) the iMovie and reinstalled it (with Mac App Store) but nothing.
    There is some option like iPhoto to rebuild database with CMD + ALT or something?

    Hi AppleMan1958,
    The problem is that in the event I have only pictures, no videos. When I insert transition effects between images or insert music not export the video. If I remove all the transitions and music then there is no problem when exporting.
    I tried to transfer the project with DropBox to other iMac and it works perfectly and I export the video without problems.
    So the problem is in my iMac. Some plist that not erase AppCleaner?

  • Problem install PSE11 with a MAC OS disc on MACBook Air

    problem install PSE11 with a MAC OS disc on MACBook Air   I've done the serial number, adobe ID, Option and now install "installation Progess" with a message Please close all of the following applications to continue:  Adobe Bridge CS4, Photoshop Elements (Adobe Photoshop elements)  I've checked to insure those are closed. Yes they are close - press "continue" but nothing happen.  HELP!

    Look in Activity Monitor (Applications>Utilities) to see if there are any adobe processes still running somewhere in the background.
    (Incidentally, just in case you're a new switcher--closing the window doesn't normally close the program on a mac, unlike windows. You must still quit the program itself.)

  • What does problems were found with the partition map mean

    Why is there a problem when I run my disk utility that says "problems were found with the partition map that which might prevent booting"?  Why is there a problem????????

    You have to repair your partition map. It's the most important part of the hard drive related to software, because if the partition map doesn't work, the whole hard drive is useless.
    As you have OS X Lion, you should be able to repair it while OS X is started. Open Disk Utility (in /Applications/Utilities), choose your hard drive at the top of the sidebar, and press the button to repair the disk. What do you see in the blank box?
    Also, after choosing the hard drive in Disk Utility, tell me the SMART status, at the bottom of the window. You may also want to check the Macintosh HD status

  • IPhone 4S IOS5 problems sync Calendar with Exchange 2003

    One of my users is having problems sync Calendar with a brand new iPhone 4S running IOS5 and our Exchange 2003 Server. If an item is updated in Outlook it will not reflect it in the iPhone or viceversa. New items show up in both, only the updates in notes or changing some text in the subject or other elements in one side is not updated in the other side. Any help will be greatly appreciate.

    Hi man, I got the same problem with my iPhone, but it has been solved..
    First, You need the Outlook 2003 or 2007 only, if you have a earlier version of this it isn't work.
    Second, You sould need to create a new PST file whit the Outlook Version 2003 or 2007, the file format must be on Unicode Format, no Outlook (97-2000) format, with this file format the import of calendar doesn't gonna be work.
    Third, You now have a PST whit Outlook 2003 or 2007 Version, you need to manually put your events on the calendar, Why? Cause if you just move it on the new calendar it gonna create and old instance of the event not a new instance, That's why iTunes doesn´t sync the calendar.
    I done all these and actually I can sync the calendar with my iphone.

  • Select or deselect multiple rows with one single selection  event

    Does anyone know how to create a JTable which can select or deselect multiple rows with one single selection event in JTable. Fore example, if the table has
    row1
    row2
    row3
    row4
    row5
    row6
    What I need is when user select row1 or row2, both row1 and row2 should be set to be selected. Then if user press CTRL and click one of row3 or row4, both of them should be selected including the previouse selected row1 and row2.
    For deselection, if row1 and row2 are selected, when users deselect one of row1 or row2, both of them should be deselected.
    Hopefully someone can give me a hint.

    Here is a partial solution using a JList. Only one line gets highlighted when the user makes a selection in the list. But, two lines are returned. There is a blank line between every two lines.
         private void addLineToList() {
              String a = f_one.getText();
              String b = f_two.getText();
              if (a.length() == 0) {
                   Utils.showInformationMessage("Item field is empty.");
                   f_one.requestFocusInWindow();
                   return;
              if (b.length() == 0) {
                   Utils.showInformationMessage("Match field is empty.");
                   f_two.requestFocusInWindow();
                   return;
              model.addElement("item: " + a);
              model.addElement("match: " + b);
              model.addElement(" ");
              int size = model.getSize();
              pairList.setSelectedIndex(size - 3);
              f_one.setText("");
              f_two.setText("");
              f_one.requestFocusInWindow();
         private void editList() {
              if (pairList.getSelectedValue().toString().equalsIgnoreCase(" ")) {
                   Toolkit.getDefaultToolkit().beep();
                   f_one.requestFocusInWindow();
                   return;
              if (!f_one.getText().equals("")) {
                   int result = JOptionPane.showConfirmDialog(this,
                   "The Item field contains text. Replace the text?",
                   "Flash Card Activity", JOptionPane.YES_NO_OPTION,
                   OptionPane.INFORMATION_MESSAGE);
                   if (result == JOptionPane.NO_OPTION) return;
              if (!f_two.getText().equals("")) {
                   int result = JOptionPane.showConfirmDialog(this,
                   "The Match field contains text. Replace the text?",
                   "Flash Card Activity", JOptionPane.YES_NO_OPTION,
                   JOptionPane.INFORMATION_MESSAGE);
                   if (result == JOptionPane.NO_OPTION) return;
              String item = "";
              String match = "";
              int index = pairList.getSelectedIndex();
              String choice = model.getElementAt(index).toString();
              if (choice.startsWith("item")) {
                   item = choice;
                   match = model.getElementAt(index + 1).toString();
                   model.remove(index);
                   model.remove(index);
                   model.remove(index);
              else {
                   item = model.getElementAt(index - 1).toString();
                   match = choice;
                   model.remove(index + 1);
                   model.remove(index);
                   model.remove(index - 1);
              int size = model.getSize();
              if (size > 2) {
                   pairList.setSelectedIndex(size - 2);
              f_one.setText(item.substring(6));
              f_two.setText(match.substring(7));
              f_one.requestFocusInWindow();
         }

Maybe you are looking for

  • Strange image-cacheing in Internet-Explorer with Java1.5-Applet

    I have written a Java-Applet for showing image-slideshows. In short words, the applet loads an image, scales it to screen-size, and loads the next image when one clicks on the applet. The applet causes a problem in MS Internet Explorer. The memory al

  • FCP studio 3 support for 'progressive segmented frames'

    Anyone got the new version of FCP. Do you happen to know if it handles 'progressive segmented frames' as anything other than interlaced. My sony hvr vie shoots what it call 'progressive'. This is explained by Sony as 'scanning progressively' yet layi

  • List of Closed PO

    There are two 'closed' states . 1) Completely close - where the GR and IR has been fully performed in accordance with your PO quantity and value 2) <b>Conditional close</b> - where end user due to some particular reason has decided to close this PO d

  • Ringtone transfer from ipad to iphone

    I inadvertently downloaded a ringtone from itunes to my ipad. I want to transfer this ringtone to my iphone 4s but don't know how. I was able to get the ringtone to my itunes on my computer but it isn't showing in my iphone sounds even after syncing

  • 404-Errors when accessing servlets with accented characters or umlauts as a parameter

    When accessing the following url http://test.sdm.de:8080/servlets/testservlet?la=Constitucion , the servlet works quite well and produces the desired response. The accented character is recieved by the servlet, and can be processed and displayed. But