What is the best (easiest) way to create thumbnails?

From (image) files selected via JFileChooser, what is the best way to create thumbnails so they can be immediately displayed?

package projects.web;
import javax.swing.*;
public class UploadApplet extends JApplet{
     public void displayGUI(){
          AppletGUI createGUI = new AppletGUI(getRootPane());
     public void init(){
          try{
               SwingUtilities.invokeAndWait(new Runnable(){
                    public void run(){
                         displayGUI();
          } catch (Exception e){
               e.printStackTrace();
} // end UploadApplet class
package projects.web;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.text.*;
import java.util.*;
import java.io.*;
public class AppletGUI{
     // JButtons
     JButton addButton = new JButton("Add");
     // JPanels
     JPanel containerPanel = new JPanel();
     JPanel optionsPanel = new JPanel();
     JPanel thumbnailPanel = new JPanel();
     // JScrollPane
     JScrollPane thumbnailScroll;
     public AppletGUI(JRootPane topContainer){
          // Add actionListener
          addButton.addActionListener(new ButtonHandler());
          // Set border layout
          containerPanel.setLayout(new BorderLayout());
          // Add buttons to target panels
          optionsPanel.add(addButton);
          // Set size and color of thumbnail panel
          thumbnailPanel.setPreferredSize(new Dimension (600,500));
          thumbnailPanel.setBackground(Color.white);
          thumbnailPanel.setBorder(new LineBorder(Color.black));
          // Add thumbnail panel to scrollpane
          thumbnailScroll = new JScrollPane(thumbnailPanel);
          // Set background color of scrollPane
          thumbnailScroll.setBackground(Color.white);
          // Add subpanels to containerPanel
          containerPanel.add(optionsPanel, BorderLayout.NORTH);
          containerPanel.add(thumbnailScroll, BorderLayout.CENTER);
          // Add containerPanel to rootPane's contentPane
          topContainer.getContentPane().add(containerPanel);
     } // end constructor
     class ButtonHandler implements ActionListener{
          public void actionPerformed(ActionEvent e){
               new FileBrowser();
          } // end actionPerformed method
     } // end inner class ActionHandler
} // end AppletGUI class
package projects.web;
import java.awt.*;
import java.io.*;
import javax.swing.*;
import javax.swing.filechooser.*;
import javax.imageio.*;
import java.util.*;
public class FileBrowser{
     JFileChooser fileChooser = new JFileChooser();
     int fileChooserOption;
     LinkedList<File> selectedFilesList = new LinkedList<File>();
     LinkedList<String> fileNames = new LinkedList<String>();
     public FileBrowser(){
          fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
          fileChooser.setMultiSelectionEnabled(true);
          fileChooserOption = fileChooser.showOpenDialog(null);
          if (fileChooserOption == JFileChooser.APPROVE_OPTION){
          for (File selectedFile : fileChooser.getSelectedFiles()){
                    selectedFilesList.add(selectedFile);
                    fileNames.add(selectedFile.getName());
          } // end enhanced for loop
          } // end if
     } // end constructor
} // end class FileBrowser

Similar Messages

  • App store icon gone what's the best/ easiest way to get it back?

    App store icon is gone what's the best / easiest way to get it back?

    Sophia,
    Be sure to look closely for the app in all of your user created folders.

  • What's the best (easiest way) to clear up voice recorded from far away?

    I decided to record my professor during one of his lectures.
    I sit in the back (power outlet~), and thus the voice is really muffled.
    I figured I'd be easily able to clear up the sound later in CS6.
    Sounds easy anyways, but for some reason, I'm not having any luck in it.
    I've done much more complex restoration stuff (no where near pro, just ocd haha), but never worked with voice before.....
    Any ideas will be helpful. Pretend like I've only used audition for a few days.
    Thanks all~!

    Unfortunately there isn't an easy or even very successful way to do this in any audio software. See the long discussion at:
    http://forums.adobe.com/thread/439183?tstart=120

  • What is the most efficent way to create both a standard and HD DVD

    Hi,
    I'm just getting into HD video editing, and I have relatives who will be several years behind me. I will be making HD DVD's for myself to use, but I will also need to make standard DVD's to send to my relatives.I am assuming that the HD DVD's I create will not play in a standard DVD player. I may be wrong. However, If this is correct, is there a particular point in the process of working with Encore where I can make that choice, create the DVD, and then go back and alter it in order to create the other type without destroying and having to redo everything that was done up to that point?

    Thank you Hunt. Being ahead of most of the rest of the world and getting the best technology out there can be a pain sometimes. Reading through Jon Geddes' article left me scratching my head several times, and some of it went way over my head, but I'll keep at it, until it sinks in. Some language, terms, and shorthand, I'm sure are simple to understand to a lot of people, but I'm not in that catagory. I'll just keep working at it. 
    Terry Lee Martin
    Date: Sun, 18 Oct 2009 13:39:08 -0600
    From: [email protected]
    To: [email protected]
    Subject: what is the most efficent way to create both a standard and HD DVD
    I would edit the Project in HD in PrPro. The BD authoring part will be straight workflow.
    For the SD DVD-Video, you have a few choices. You can Export to DV-AVI Type II for Import into a new Encore Project for the DVD. Some feel that PrPro does not do a good job at down-rezing from HD to SD. For a workflow that will likely yield better quality, see this http://www.precomposed.com/blog/2009/07/hd-to-sd-dvd-best-methods/. If you have PrPro/Encore CS4, then Jeff Bellune's /thread/487134?tstart=0 might be useful to you. Just follow the links to the tutorial.
    Good luck,
    Hunt
    >

  • What are the best editing softwares to create sequence shots and slow down video?, What are the best editing softwares to create sequence shots and slow down video?

    What are the best editing softwares to create sequence shots and slow down video?, What are the best editing softwares to create sequence shots and slow down video?

    Do you want free or do you want the best, your original post said best, now you are saying free. This is a contraction, there is no such thing as best free. There is such a thing as free and such a thing as best.
    Also is your focus video or photos?????

  • What is the best Adobe program for creating interactve iPad books?

    I'm a graphics/media guy & and my mate is a children's book illustrator
    working on a little 20 page interactve kids book for 2-6 years old, I'm looking for feedback
    on what is the best Adobe program for creating interactve iPad books? and then extending
    the material for other tablets. my findings so far.
    - InDesign 6 - Best layout limited intractivity and issues with the folio builder
    - Edge - HTML 5 BUT No Audio/Video
    - Digital Publishing Suite the cost is just silly for the little guy
    I welcome your thoughts and opinions

    You may also be interested in this project that we've launched on Kickstarter to export HTML5 directly from InDesign, so that your content can easily be viewed across devices:
    http://www.kickstarter.com/projects/ajarproductions/indesign-to-html5

  • What is the best, cheapest way to upgrade from CS3 MAC to a newer CS for PC

    What is the best, cheapest way to upgrade from CS3 MAC to a newer CS for PC? I do graphic desing mostly print and some web and want to get into ebooks and more web graphics?

    Hi riverwalk2,
    I have check & found Design Standard CS3 that you have might be eligible for few special offer for the latest version of Adobe Creative Cloud which is independent of Operationg systems.
    Please choose the best option in http://www.adobe.com/products/discount-software-coupons.html?promoid=KAWQR
    Hope it helps you,
    Regards,
    Rajshree

  • What is the best free software to create an advert on?

    I am looking to create a couple of adverts both poster and video, i was wondering what is the best free software to make these on?

    For laying out the poster ad
    Free, open source apps.
    GImp (free, open source Photoshop replacement)
    http://www.gimp.org/downloads/
    PIxelmator (cheap near Photoshop-like replacement)
    http://www.pixelmator.com/
    Free Vector drawing app.
    Inkscape
    http://www.inkscape.org/en/download/mac-os/
    Drawberry
    http://raphaelbost.free.fr/DrawBerry.html
    Free Page Layout app, if needed.
    If this is already on your Mac.
    Apple Pages app.
    OR Free, open source
    Scribus OS X
    http://www.scribus.net/canvas/Scribus
    There aren't very many free video editors for Mac OS X.
    If this is already on your Mac,
    iMovie
    KDenlive
    http://kdenlive.org/downloading-and-installing-kdenlive
    LIghtworks OS X
    http://www.lwks.com/
    A few caveats about Lightworks video editor.
    OS X version is free to download and use as a public beta testing.
    This is a very comprehensive video editor, but for free use, you have to register as a public beta tester and every week you use this you have to re-register the app and answer a survey of questions about the software.
    If you do not comply with the beta testing rules and procedures, and the developer believes you are not actively invovled with the beta testing to help develope and improve this app, the developer has the right to discontinue your free use of the software and you will no longer be able to use or activate the software.
    I really wanted to try this software for free, but didn't want to have to be tied to the beta testing rules, constant developement surveys, questions and weekly re-registering as a beta tester for the use of this software.

  • What is the best Mac choice for creating pro-level art/graphics/animation?

    I'm an artist who does a lot of work with Adobe Creative Suite CS5, as well as some video editing and lots of animation. I've been using a 2007 model 15-inch Macbook Pro for the last 4 years, and it seems like it's time to upgrade...it runs burning hot all the time, and the battery dies pretty quick when the cord falls out. It seems like the whole thing is running a little slow, which is probably because I have a TON of graphics/animation/video software on there, but I need each and every program.
    My question is, what is the best new Mac to purchase to replace this one? I want to make sure it lasts as long as possible, and will be able to handle the programs I use now. My first thought is to get another Macbook Pro, because of the portability, and just add on all the higher RAM, etc to customize it. But my husband suggested looking into the Mac Mini, because it's a lot cheaper, and we're a little strapped for cash at the moment. Would that serve the purpose? Or is a Macbook Pro really the best choice for what I need it to do?
    I'd love to hear suggestions from other artists or graphics people. What do you recommend?

    For a "cash strapped" person, unless you already
    have a monitor, one of the new iMacs may be
    a better choice.  If you do have a monitor, I would
    suggest the dual core i7 equipt MacMini.  Since you state
    you are using CS5 stuff, most Adobe apps,
    Photoshop for example, do not make effective
    use of multiple cores.  Also, using any of the
    Adobe products, regardless of which computer
    you decide on, get as much RAM as you can afford.

  • Start-up Magazine Advice on what is the best/cheapest way to produce this with DPS

    Hello,
    I am designing a magazine (for distribution on the Apple Newsstand or as a standalone app) I was wondering if any one had any advice as to which would be the best way to go about publishing - as far as what package to buy to distribute it.
    I am trying to find the most cost effective way to get this published as this is a test magazine and if he likes his results then he plans on doing between 4-6 issues a year.
    My thoughts are to create a single app for the Apple store, see the results, and if they are positive then go ahead and create it for the Newsstand and purchase a bundle of downloads. It seems to be cheaper and more cost effective for a project that he is not even sure he will be continuing. Does anybody have any pros or cons to this?
    As far as I understand it if I subscribe to the Creative Cloud, then I will be able to create a single edition app to distribute on the app store? And from what I have read the cost to create this app is free?
    If I subscribed to the creative cloud does that come with a certain number of fulfillments to start with?
    I have requested a consultation from Adobe with these concerns for over a week now and they have yet to get back to me so I figured I would ask the people who actually have experience in this.
    ANY advice/suggestions for this is GREATLY appreciated!

    Thanks Bob.
    Do you get any free download fulfillments to start off iwth or you have to purchase those to begin with if you wanted to put a mag on the newsstand?

  • What is the best/fastest method to create a table (Oracle 11gR2 dB)?

    Assuming there are no statistics for the source tables - tables are every day dropped and recreated
    My tables have a few million rows
    I try to create a table populated with data as fast as it is possible via
    1. createtable_name as SELECT * from emp;
    2. create table_name
    Parallel degree 4
      as SELECT * from emp;
    I 1 case I got timing about 34 Sec
    In case 2 the table was created in 15 Sec
    Is in oracle other possibilities to create a table much faster that with this CTAS?
    Or it will be faster when I will create a table via create table_name
      column1datatype[NULL | NOT NULL],
      column2datatype[NULL | NOT NULL],
      column_ndatatype[NULL | NOT NULL]
    or maybe should I use this one method
    INSERT /*+ APPEND */ INTO empSELECT * FROM all_objects;
    INSERT /*+ APPEND_VALUES */ INTO emp SELECT * FROM all_objects;
    or it is better to simple create a table
    and than use FORALL BULK INTO COLLECTION statement
    whit combination of
    INSERT /*+ APPEND */ INTO emp;

    Assuming there are no statistics for the source tables - tables are every day dropped and recreated
    My tables have a few million rows
    The 'fastest' way is to NOT drop and recreate the tables every day.  Unless the table changes structure every day just create the tables ONE TIME. The each day you can truncate them with the REUSE STORAGE clause.
    Then populate the tables using DIRECT-PATH loading such as by using the APPEND hint. That can also be done in PARALLEL if desired.
    FORALL and BULK COLLECTION would ONLY be used if the data is ALREADY in collections as part of complex ETL data cleansing/conversion. If the data already exists in external files or other tables there is generally no need to use PL/SQL or collections.
    What PROBLEM are you trying to solve?
    You need to give us much more info if you really want help. For ETL the task of 'loading a table fast' is generally WAY DOWN the list of concerns.
    1. where is the data now?
    2. How much data is there?
    3. what cleansing/conversion needs to be done on the data?
    4. what are the requirements for restart/recovery needed?
    5. what are the requirements for detecting and reporting on data issues?

  • What's the 'best practice' way to get email and fax number from vendor?

    Hello *,
    could anybody let me know what the 'best-practice' is to get the fax number and smtp address from the vendor master? Is there a preferred function module I should use?
    Thanks a lot,
    Torsten

    Hi ,
    try that:
    TYPE-POOLS: szadr.
    DATA adr_kompl TYPE szadr_addr1_complete.
    DATA adr1 TYPE szadr_addr1_line.
    DATA adtel TYPE szadr_adtel_line.
    DATA admail TYPE szadr_adsmtp_line.
    DATA adfax TYPE szadr_adfax_line.
    CALL FUNCTION 'ADDR_GET_COMPLETE'
           EXPORTING
                addrnumber              = lfa1-adrnr
           IMPORTING
                addr1_complete          = adr_kompl
           EXCEPTIONS
                parameter_error         = 1
                address_not_exist       = 2
                internal_error          = 3
                wrong_access_to_archive = 4
                OTHERS                  = 5.
    * Mail
      LOOP AT adr_kompl-adsmtp_tab INTO admail.
        MOVE admail-adsmtp-smtp_addr TO atab-mail.
      ENDLOOP.
    * fax
      LOOP AT adr_kompl-adfax_tab INTO adfax.
        MOVE adfax-adfax-fax_number TO atab-fax_number.
      ENDLOOP.
    regards Andreas

  • What is the best Adobe program for creating animated UI concepts for compositing?

    I'm starting work on a concept of what an OS using the Oculus Rift might be like, mostly for fun. But I'm not sure what program would best suit my needs for that sort of work. I currently have the Photography CC pack, and I have Premiere CC as well. Would photoshop's animation systems work best, or is there something else I would have a better time with? I would need something that could output plain jane image frames with alpha channels.
    I have a fair amount of experience with photoshop, but the few times I've used it's animations features I've had a hell of a time figuring things out and doing certain things. Should I just learn that, or is there something that would work significantly better?

    For help with Photoshop, go to Photoshop General Discussion
    Otherwise, I have no idea

  • Auditing tables - What are the best possible ways of doing it?

    Hello Everyone,
    DB version: 10g.
    Brief description of the problem: Right, now I am working on an application which has a java frontend and oracle
    backend. We have no access to the java code at all. So, it is a complete blackbox. . Just wondering, if I could go for a schema level trigger to know, which columns of which tables are altered upon some action at the frontend. Or, if I know the tables specifically, say tab A and tab B; Should I go for a row level trigger on them, instead of going for a
    schema level trigger. Which approach will be the best? If possible, would you please point me to some code samples
    for both of them.
    Thanks.

    http://www.oracle.com/pls/db102/search?remark=quick_search&word=audit&tab_id=&format=ranked

  • What is the most efficient way to create an image with no background?

    When I create, or use, a logo, or type, or any graphic image,in a design, I want to import it to InDesign with no background - "transparent", if you will.
    The steps involving importing from PShop seem convoluted, at best, with bitmap, greyscale and eps files... I know I am on the wrong track with this process, since it never seems to work.
    Also, wish to import from Illustrator and sometimes Painter12.
    Is there a quick'n'dirty way, or a best way, to do this?
    Thanks, forum people!

    First, it's OK to combine responses into a single post. Everything goes to the forum, not the individual, so we all see it all,so to speak.
    Double clicking the background or duplicating it are just different paths to the same end, and you pick one based on what you are doing, as much as anything. "Background" in Photoshop is locked for transparency, so if you need a tranparent background you MUST do something. If I know I'm not going to need to do other stuff, I probably would double-click and convert the layer just for convenience and to reduce the file size, but if it's a client file or I know I may need to add adjustments and so forth, I usually will duplicate the background (even if I don't need transparency) and turn off the original. This gives me an untouched backup position and a source for making more copies, if necessary. I don't like doing any sort of destructive edit without using a copy of the original data.

Maybe you are looking for