How do you make marching ants selection?

Does anyone know how to produce the "marching ants" effect for selecting sections of an image/picture?
Thanks,
Everyman

English? How about the universal language:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class MarchingAnts extends JComponent {
     public static void main(String[] args) {
          JFrame f = new JFrame("Marching Ants");
          f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          JComponent app = new MarchingAnts("Only a test");
          f.getContentPane().add(app);
          f.setSize(200,200);
          f.setVisible(true);
     private float dashPhase;
     private String text;
     public MarchingAnts(String text) {
          setOpaque(true);
          this.text = text;
          Timer tmr = new Timer(100,null);
          tmr.addActionListener(new ActionListener(){
               public void actionPerformed(ActionEvent evt) {
                    ++dashPhase;
                    repaint();
          tmr.start();
     protected void paintComponent(Graphics g) {
          super.paintComponent(g);
          Graphics2D g2 = (Graphics2D) g;
          g2.fillRect(0,0,getWidth(),getHeight());
          g2.setPaint(Color.WHITE);
          Stroke stroke = new BasicStroke(1.0f, BasicStroke.CAP_BUTT,
               BasicStroke.JOIN_BEVEL, 0.0f,
               new float[]{4, 2, 6, 2},
               dashPhase);
          g2.setStroke(stroke);
          g2.drawRect(50,50,100,100);

Similar Messages

  • How do you make a scene selection?

    i recently made about 18 movies on imove with a total length of 9 hours and 43 minutes so they are all exported seperately.
    i want to be able to put them on idvd with a scene selection but i want to know if there is a way to put a "play all" button.
    Another question - what would the best way to distribute the movie (like is there a way to fit this much movie on a dvd)
    Any help is apprectiated!

    Hi
    A. iDVD limit is about 240 minutes on DL-DVDs and that is Movie + MENU (and this can take significant space/minutes)
    iDVD 08, 09 & 11 has three levels of qualities. (version 7.0.1, 7,0.4 & 7.1.1)
    iDVD 6 has the two last ones
    • Professional Quality
    (movies + menus up to 120 min.) - BEST (but not always for short movies e.g. up to 45 minutes in total)
    • Best Performances
    (movies + menus  less than 60 min.) - High quality on final DVD (Can be best for short movies)
    • High Quality (in iDVD08 or 09) / Best Quality (in iDVD6)
    (movies + menus up to 120 min.) - slightly lower quality than above
    About double on DL DVDs.
    B. Scene selections - is as I get it Chapters and they are preferably set in the movie editor e.g. iMovie or FinalCut. iDVD will create Scene Selection sub-menu automatically.
    C. Play all button - No there are non in iDVD - but can be faked in two ways.
    • Double movie way - all parts + one full movie containing all
    Pro - easy to do and easy to understand
    Cons - takes up x2 space
    • Put movies into a SlideShow and un-cheque limit picture size
    Pro - x1 space
    Cons - To me the Audio was severely degraded
    D. Total space
    • iDVD - 240 minutes (iDVD do not care about Gbs at all only duration)
    • Roxio Toast™ - Can squees in 10 hours on a SL-DVD and about x2 on DL-DVD (I guess)
    CONS - The Quality will be severely degraded making old VHS tapes recorded in LP-mode look fabulous when compared - Yes 10 hours will look awful.
    Yours Bengt W

  • Simple question - How do you make an onchange event occur in a select list

    Simple question - How do you make an onchange event occur in a select list to fire a process?
    Thanks

    1) Using ApEx Selec list on Submit Item.
    You will create a PL/SQL Process after Submit. -> Conditional Type Request = Expression1. -> Expression1 is the name of your Select List. Process Source - > Procedure you like. For example depending of your select List value you will add rows in different tables.
    2) Javascript This example will change a System parameter value when changed
    <select id="P3_SUBSYSTEM" onchange="location.href='f?p=101:3:2164422329953284::NO::P3_SUBSYSTEM:'+this.options[selectedIndex].value;" size="1" name="p_t21">

  • How do you make the background of an object transparent in Adobe Illustrator?

    Hello Forum.
    How do you make the background of an object transparent in Adobe Illustrator?
    I have been having issues with using the Magic Wand tool in Adobe Illustrator as well as the lasso tool.
    Basically, I am trying to put a small graphic into a new Illustrator file.
    The first thing I tried to do is to use the magic wand tool.  But I found out that this did not work on a jpeg image since it did not have any individual objects to select.
    So I tried something new.  I opened the file in Adobe Photoshop and used the lasso tool to select an area.  Then I coped this area.  Then I tried to paste it into Adobe Illustrator.  But the background was not transparent for the pasted image.
    How do I make the background transparent.
    I made this small video to show what I am talking about:
    http://youtu.be/2LgMGEF6z10

    Don't Copy/Paste the image.
    Make it transparent in Photoshop, save a PSD and place it in Illustrator

  • How do you make "Acrobat X Pro" open the "combine pdf" window in the foreground?

    How do you make "Acrobat X Pro" open the "combine pdf" window in the foreground?
    I am using a "Windows 7" computer at work with "Acrobat X Pro" and I'm constantly combining
    pdf's and tiff's in Acrobat.
    It would be nice if when I select 30 or 40 files to combine, the
    "Combine Supported Files in Acrobat" window would open in the
    foreground, not behind the 10 or so windows already open.
    I have been researching this for some time now with no solution.
    If the answer is that "IT CAN'T BE DONE", then that's fine. At least
    I will have an answer and can stop searching. If (as I suspect) it can
    be done, then kindly supply me with "step by step" instructions.
    Michael Jones

    Something that works  (provides Acrobat the application precedence in the OS that is requisite for this) --
    Minimize the 10 or so application windows before engaging use of Acrobat's "combine".
    That'll let the Acrobat dialog windows display front and center.
    Be well...

  • How do you make adobe X open the "combine pdf" window in the foreground?

    This may not be the correct forum for this question, but considering that I simply
    have not been able to get a reply in any other Adobe forum, I decided
    to just post this question to ALL Adobe forums until I get a response.........
    How do you make adobe X open the "combine pdf" window in the foreground?
    I am using a "Windows 7" computer at work with "Acrobat X Pro" and I'm constantly combining
    pdf's and tiff's in Acrobat.
    It would be nice if when I select 30 or 40 files to combine, the *******
    "Combine Supported Files in Adobe Acrobat" window would open in the
    foreground, not behind the 10 or so windows already open.
    I have been researching this for some time now with no solution.
    If the answer is that "IT CAN'T BE DONE", then that's fine. At least
    I will have an answer and can stop searching. If (as I suspect) it can
    be done, then kindly supply me with "step by step" instructions.
    Michael Jones

    Hi ,
    I guess that was a bug in that version .
    It does not happen in Acrobat XI and Acrobat DC .The window comes right in front of everything else .
    I wonder that was a bug and that was fixed the other versions.
    You could upgrade to the latest Acrobat version ,i.e Acrobat DC and you would not experience this anymore .
    Regards
    Sukrit Dhingra

  • How do you make photos vertical in iPhoto calendar?

    When making a calendar in iPhoto, and you choose 6 or 7 photos to be displayed on that month, how do you make the 4 little photos vertical?

    You can't change the frame.  But you can Control-click on the photos and select Fit Photo to Frame Size and it will reduce the size of the photo so the entire portrait photo will display in the frame.  The excess background will be the same color of the page's background.
    Happy Holidays

  • How do you make images transparent in inDesign?

    How do you make images transparent in Adobe InDesign CS5.5?

    Dittco wrote:
    It IS possible: Select the image. Open effects (Window > Effects). Switch from "normal" to "multiply". Viola! White background is gone.
    That only works with a white background. In addition, it introduces a transparency effect, with its associated problems.
    With a rather light background: Select the image. Open clipping path (Object > Clipping Path > Options). Select Type > Detect Edges; use Threshold and Tolerance to get as close as possible to the edge of your image. This may be difficult because of a too low resolution image, or too much fringe on the edge -- if all fails, use the Inset Frame value to force the mask "into" the image. Click OK, and the background is gone.
    But that's not the only way: you can always create a clipping path manually, and then you are in total control, not limited by transparency side effects, auto-edge detection, and busy backgrounds.

  • Hi Everyone, how do you make adjustments to many pics at once

    Hi Everyone, how do you make the same adjustment to many pics in one go? Tried select All, and then adjust, but that only does the original selected pic..

    First of all, make sure, tat the "Primary only" flag is not enabled. (Edit menu > Primary only).
    Then rotate, clip, keywords will be applied to all selected image versions.
    Only the adjustments applied from the Adjustment panel will still only be applied to the primary selection. But you can use the "Lift&Stamp" tool to transfer all adjustments from an edited image to all selected images at once.
    The "Lift&Stamp" tool to the left, the "primary Only" button to the right.
                     Keywords or ratings are applied only to one of the selected images - why?

  • In photoshop, how do you make a background a solid color?

    In photoshop, how do you make a background a solid color?

    Select all then edit fill is one way.
    However if you mean the background behind a subject you need to separate the subject from its background the change just the background.  Look for tutorials on replacing background and extracting subjects

  • HOW DO YOU MAKE A VIGNETTE AROUND A PHOTO IN PSE 7?

    HOW DO YOU MAKE A VIGNETTE AROUND A PHOTO IN PSE 7?  ALSO, HOW DO  YOU MAKE THE PHOTO KIND OF HAZY LOOKING?  JUST A SLIGHT BIT FOR EFFECT.  THANK YOU FOR YOUR HELP!  

    1966desertrat,
    There are various ways to do this; here is one:
    Open picture file
    Duplicate background layer
    Open new blank layer, and fill with white (Edit>fill>white)
    Drag this layer between the background layer and the background copy layer
    On the top layer, make a selection of the subject by dragging with the Elliptical marquee tool, position it to embrace the subject - can use arrow keys on keyboard to fine-tune
    Go to Select>inverse
    Go to Select>feather>try 25px - experiment for degree of feather
    Hit delete on keyboard
    Go to Select>inverse
    Go to Select>deselect
    To blur, go to Filter>blur>gaussian blur and adjust slider to suit
    Message was edited by: hatstead
    You may like Dreamy Suite software which you can download free. I use the stand-alone version.
    http://www.autofx.com/freeplugins/dreamyphoto.asp?id=7

  • How do you make it so that the ipod will play all the different artists featured in an album when you click that album to play?

    How do you make it so that the ipod will play all the different artists featured in an album when you click that album to play? At the moment, each artist in the album is being separated and I can't play them together. For example, to play the Halo 2 Soundtrack, Hoobastank, Breaking Benjamin, Nile Rodgers, etc. are some of the artists featured. However, in the Albums category, they are each separate choices. I want to play them all together, but can't. Is there a way to do that?

    It sounds like the album metadata is incorrect, or differs from song to song in iTunes.  Albums with various artists will play properly assuming all the songs are tagged with the same identical album name, as well as the track number.  For the Halo 2 Soundtrack, metadata should look like this:
    Song: <Song Title>
    Artist: <Song Artist>
    Album: Halo 2, Vol. 1 (Original Soundtrack)
    Genre: Soundtrack
    I had a similar problem with my imported Cowboy Bebop albums and the mixture of artists/album names.  Once I adjusted the metadata, all of them play in the correct order just by selecting the Album from the available list or in Coverflow.

  • Whenever I select something, for example, I cannot see the marching ants selection until I either scroll up or down or zoom in or out. This occurs whenever I paste an image as well--nothing shows on screen until I scroll up or down or zoom in or out. Why

    Whenever I select something, for example, I cannot see the marching ants selection until I either scroll up or down or zoom in or out. This occurs whenever I paste an image as well--nothing shows on screen until I scroll up or down or zoom in or out. Why is this?

    Ap_Compsci_student_13 wrote:
    ok sorry but doesn't sscce say to post the whole code?the first S is Short, and yes, it needs to be all the code needed to illustrate the problem and let use reproduce it. If you were developing a new Web framework, your example might be short, but for a student game it's very long.

  • How do you make an image or text, appear on every slide?

    How do you make an image appear on every slide?

    What part did you not understand?
    As Andrew said, open the Keynote file, go to the View Menu>Show Master Slides
    This is what you should see on the left hand slide of the window. The Master slides are at the top and the check mark goes by the Master Slide that is referenced on which ever slide you have selected in the Slides pane.
    Add to the Master slide the image or text that you would like to see on the slides that are made off of that master. You can see in the Title & Bullets master slide, I added the shape in the lower left hand corner and it was added to all the slides build off that master.
    If this still isn't clear, let us know where you are getting stuck and we will try to help.

  • How do you make invisible folders visible

    how do you make invisible folders visible? My hard drive icon will not show up? I did not set-up this computer.

    The instructions I provided have nothing to do with Time Machine. Did you try what I suggested? If you select the "alias" file then CTRL- or RIGHT-click and select Show Original in the context menu.
    Maybe it would be helpful if you were to provide a more complete description of this issue.

Maybe you are looking for

  • Badi for contact person creation of isa user admin

    Hi fnds, I am creating a new custom field on isa user admin app of b2b. Now when i create a contact, the FM CRM_ISA_UA_IUSER_CREATE is been called. I am planning to pass this custom value to extension table of this FM. Now can u tell me a badi which

  • Crystal Report Viewer on Client Machine

    Hi all,            I am new to Crystal Reports. I want Open the crystal Report from SAP Interprise Portal. I want to know the Crytal Report viewer needs to be installed on client machine or without that also we can show the report. Thanks for your su

  • How to get Select All or select Multiple columns  in OOALV

    HI Experts i'm assignig internal table to dynamic internal table(FS_IST_TABLE) for to display the output. but i'm not geting the Select ALL Option. and i can't select multiple columns at a time. where i can select only one column. how can i select mu

  • My HP LaserJet 100 color MFP M175nw is getting a 52 error message

    My HP LaserJet 100 color MFP M175nw is getting a 52 error message, how i can fix it ?

  • Why OCR crash on certain pages??

    I have a number of PDF files of texts, with the content in Chinese and the source of the files generally unknown. I do OCR on them so that I can index them with DevonThink and then find content quickly. Some of the files undergo OCR with no problem a