JFrame (extended) state, iconified/maximized/normal question

Greetings and salutations,
I've been removing some rough edges from my last application and I noticed the
following: before an application quits every location/size of the top level components
is written to a file. When the application starts again everything is read back in
again and the application shows itself just as it was before it closed the last time.
There's one little quirck though:
A JFrame can be in one of three states when an application quits:
1) iconified; nothing is wrong here, i.e. the application comes back on in the same
iconified state and after de-iconification the JFrame shows up the same as
before the previous quiting.
2) 'normal': same as above: the JFrame shows up identical as before quiting
the application the previous time.
3) maximized: the new incarnation shows up as a maximized JFrame, but after
'demaximalization' (sorry) the JFrame keeps its maximum size, i.e. if still fills up
the entire screen.
Before quiting I save the bounds, the state and the extended state of a JFrame
and reinstate these values after a new incarnation of the application. I think I've
tried all 2^3 == 8 possible permutations of this all, but option 3) keeps giving
me trouble, i.e. the bounds don't work after 'demaximalization'.
Ideas anyone?
kind regards,
Jos

Here's a test program for people who want to experiment around a bit, but are reluctant to create a test class:import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
public class Test extends JFrame {
    public Test () {
        setDefaultCloseOperation (WindowConstants.DISPOSE_ON_CLOSE);
        setTitle ("Test");
        WindowInfo windowInfo;
        try {
            windowInfo = read ();
        } catch (Exception exception) {
            System.err.println ("couldn't read window.info");
            windowInfo = new WindowInfo ();
        setLocation (windowInfo.location);
        setSize (windowInfo.size);
        setExtendedState (windowInfo.extendedState);
        addWindowListener (new WindowAdapter () {
            public void windowClosing (WindowEvent event) {
                try {
                    write (new WindowInfo (getLocation (), getSize (), getExtendedState ()));
                } catch (Exception exception) {
                    System.err.println ("couldn't write window.info");
        setVisible (true);
    public static void main (String... parameters) {
        new Test ();
    private WindowInfo read () throws ClassNotFoundException, IOException {
        ObjectInputStream in = null;
        try {
            in = new ObjectInputStream (new FileInputStream ("window.info"));
            return (WindowInfo) in.readObject ();
        } finally {
            if (in != null) {
                try {
                    in.close ();
                } catch (IOException exception) {}
    private void write (WindowInfo windowInfo) throws IOException {
        ObjectOutputStream out = null;
        try {
            out = new ObjectOutputStream (new FileOutputStream ("window.info"));
            out.writeObject (windowInfo);
        } finally {
            if (out != null) {
                try {
                    out.close ();
                } catch (IOException exception) {}
    private class WindowInfo implements Serializable {
        public Point location;
        public Dimension size;
        public int extendedState;
        public WindowInfo () {
            size = new Dimension (600, 400);
            Dimension screenSize = Toolkit.getDefaultToolkit ().getScreenSize ();
            location = new Point (screenSize.width / 2 - size.width / 2, screenSize.height / 2 - size.height / 2);
            extendedState = NORMAL;
        public WindowInfo (Point location, Dimension size, int extendedState) {
            this.location = location;
            this.size = size;
            this.extendedState = extendedState;
}Note that I fooled around myself a bit too.

Similar Messages

  • Frame extended state and window bounds.

    I'm trying to save the bounds of a window when my program exits, so that I can initialize the next session to the same window bounds. It seems well known that calling getBounds() on a maximized window will basically give you your screen dimensions. So this means that if the user exits the program when the window is maximized, the next time they start it up, the window will be set to fill their screen as though it were maximized, but in the restored state. Not good. It also seems well known that there is no clean way to get the restored bounds on a maxmized window. Also not good. I found this forum on the subject:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=603605
    Someone suggested restoring the window manually before checking the bounds, but I don't want to do this because the action would be visible to the user, and takes time. Instead I opted for the component listener approach. Here's where my problem comes in:
    It seems that move and resize events happen at inconsistent times. In my component listener, I poll window.getExtendedState() and getBounds() in componentMoved() and componentResized(). When I maximize the window, I get MOVE event that shows getExtendedState() to be NORMAL, but getBounds() to be maximized. When I restore the window, I get a RESIZE event that shows getBounds() to be restored.
    Maybe I'm just confused here, but this doesn't make any sense. Those two values should be consistent-- and I should get the event after everything is DONE, including the extended state flag being properly set. It seems to me that this is bug-like behavior. Am I wrong?
    Furthermore, my problem remains, because if the user exits in the maximized state, the last event will have been a reporting of the maximized window bounds-- so my attempts to remember what the window was before it was maximized will have failed. It really steams me that the API seems to be conspiring to prevent me from getting this simple piece of information.
    So has there been any progress on the front of a clean solution to getting the restored bounds without restoring the window? Surely that information exists somewhere in the JVM. I shouldn't have to do backflips to get it. (Perhaps I should post a feature request).
    How should I get around this?
    P.S.
    Here's a test case:
    import java.awt.event.ComponentEvent;
    import java.awt.event.ComponentListener;
    import javax.swing.JFrame;
    * @author Tim Babb
    public class Main {
        static JFrame frame;
        public static void main(String[] args) {
            frame = new JFrame("Test Case");
            frame.addComponentListener(new ComponentListener(){
                public void componentHidden(ComponentEvent evt){
                    //do nothing
                public void componentMoved(ComponentEvent evt){
                    if (frame.getExtendedState() == frame.NORMAL){
                        System.out.println("Moved: " + frame.getBounds());
                public void componentResized(ComponentEvent evt){
                    if (frame.getExtendedState() == frame.NORMAL){
                        System.out.println("Resized: " + frame.getBounds());
                public void componentShown(ComponentEvent evt){
                    //do nothing
            frame.setVisible(true);
    }

    I am seeing the same thing, it seems that in Windows maximize delivers two events a move and then a resize. The change state event comes in the middle, I am sure there is some good reason.
    I have had a go at writing a NormalBoundsListener that compensates for this. Would be interested to find out if this was Windows specific.
    Hope this helps, if you have a better solution please let me know.
    private class NormalBoundsListener implements ComponentListener {
    private final Rectangle previousNormalBounds = new Rectangle();
    private int previousExtendedState = 0;
    public void componentHidden(ComponentEvent e) {
    // do nothing
    public void componentMoved(ComponentEvent e) {
    storeNormalBounds();
    public void componentResized(ComponentEvent e) {
    storeNormalBounds();
    public void componentShown(ComponentEvent e) {
    storeNormalBounds();
    private void storeNormalBounds() {
    int extendedState = getExtendedState();
    if(extendedState == Frame.NORMAL) {
    previousExtendedState = extendedState;
    previousNormalBounds.setBounds(normalBounds);
    getBounds(normalBounds);
    } else if(extendedState == Frame.MAXIMIZED_BOTH && previousExtendedState == Frame.NORMAL) {
    previousExtendedState = extendedState;
    normalBounds.setBounds(previousNormalBounds);
    }

  • Extended stats partial implementation (multi-column stats) in 10.2.0.4

    Hi everyone,
    I saw a note today on ML, which says that new 11g's feature - [Extended statistics|http://download.oracle.com/docs/cd/B28359_01/server.111/b28274/stats.htm#sthref1177] - is partially available in 10.2.0.4. See [Bug #5040753 Optimal index is not picked on simple query / Column group statistics|https://metalink2.oracle.com/metalink/plsql/f?p=130:14:3330964537507892972::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,5040753.8,1,0,1,helvetica] for details. The note suggests to turn on this feature using fixcontrol, but it does not say how actually to employ it. Because dbms_stats.create_extended_stats function is not available in 10.2.0.4, I'm curious how it is actually supposed to work in 10.2.0.4? I wrote a simple test:
    drop table t cascade constraints purge;
    create table t as select rownum id, mod(rownum, 100) x, mod(rownum, 100) y from dual connect by level <= 100000;
    exec dbms_stats.gather_table_stats(user, 't');
    explain plan for select * from t where x = :1 and y = :2;
    select * from table(dbms_xplan.display);
    disc
    conn tim/t
    drop table t cascade constraints purge;
    create table t as select rownum id, mod(rownum, 100) x, mod(rownum, 100) y from dual connect by level <= 100000;
    exec dbms_stats.gather_table_stats(user, 't');
    alter session set "_fix_control"='5765456:7';
    explain plan for select * from t where x = :1 and y = :2;
    select * from table(dbms_xplan.display);
    disc
    conn tim/t
    drop table t cascade constraints purge;
    create table t as select rownum id, mod(rownum, 100) x, mod(rownum, 100) y from dual connect by level <= 100000;
    alter session set "_fix_control"='5765456:7';
    exec dbms_stats.gather_table_stats(user, 't');
    explain plan for select * from t where x = :1 and y = :2;
    select * from table(dbms_xplan.display);In alll cases cardinality estimate was 10, as usually without extended statistics:
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |    10 |   100 |    53   (6)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| T    |    10 |   100 |    53   (6)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("X"=TO_NUMBER(:1) AND "Y"=TO_NUMBER(:2))10053 trace confirmed that fix is enabled and considered by CBO:
    PARAMETERS USED BY THE OPTIMIZER
      PARAMETERS WITH ALTERED VALUES
      optimizer_secure_view_merging       = false
      _optimizer_connect_by_cost_based    = false
      _fix_control_key                    = -113
      Bug Fix Control Environment
      fix  5765456 = 7        *
    ...But calculations were typical:
    BASE STATISTICAL INFORMATION
    Table Stats::
      Table:  T  Alias:  T
        #Rows: 100000  #Blks:  220  AvgRowLen:  10.00
    SINGLE TABLE ACCESS PATH
      BEGIN Single Table Cardinality Estimation
      Column (#2): X(NUMBER)
        AvgLen: 3.00 NDV: 101 Nulls: 0 Density: 0.009901 Min: 0 Max: 99
      Column (#3): Y(NUMBER)
        AvgLen: 3.00 NDV: 101 Nulls: 0 Density: 0.009901 Min: 0 Max: 99
      Table:  T  Alias: T    
        Card: Original: 100000  Rounded: 10  Computed: 9.80  Non Adjusted: 9.80
      END   Single Table Cardinality Estimation
      Access Path: TableScan
        Cost:  53.19  Resp: 53.19  Degree: 0
          Cost_io: 50.00  Cost_cpu: 35715232
          Resp_io: 50.00  Resp_cpu: 35715232
      Best:: AccessPath: TableScan
             Cost: 53.19  Degree: 1  Resp: 53.19  Card: 9.80  Bytes: 0Any thoughts?

    Jonathan,
    thanks for stopping by. Yes, forcing INDEX access with a hint, disabled fix for bug and more correctly gathered statistics shows INDEX access cardinality 1000:
    SQL> alter session set "_fix_control"='5765456:0';
    Session altered
    SQL> exec dbms_stats.gather_table_stats(user, 't', estimate_percent=>null,method_opt=>'for all columns size 1', cascade=>true);
    PL/SQL procedure successfully completed
    SQL> explain plan for select /*+ index(t t_indx) */ * from t where x = :1 and y = :2;
    Explained
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 4155885868
    | Id  | Operation                   | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |        |    10 |   100 |   223   (0)| 00:00:03 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T      |    10 |   100 |   223   (0)| 00:00:03 |
    |*  2 |   INDEX RANGE SCAN          | T_INDX |  1000 |       |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("X"=TO_NUMBER(:1) AND "Y"=TO_NUMBER(:2))but it still isn't correct for TABLE ACCESS. With default statistics gathering settings dbms_stats gathered FREQUENCY histogram on both X & Y columns and computations for cardinality estimates were not correct:
    SQL> alter session set "_fix_control"='5765456:0';
    Session altered
    SQL> exec dbms_stats.gather_table_stats(user, 't', cascade=>true);
    PL/SQL procedure successfully completed
    SQL> explain plan for select /*+ index(t t_indx) */ * from t where x = :1 and y = :2;
    Explained
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 4155885868
    | Id  | Operation                   | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |        |    10 |   100 |     4   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T      |    10 |   100 |     4   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | T_INDX |    10 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("X"=TO_NUMBER(:1) AND "Y"=TO_NUMBER(:2))I believe this happens due to CBO computes INDEX selectivity using different formula for that case:
    BASE STATISTICAL INFORMATION
    Table Stats::
      Table:  T  Alias:  T
        #Rows: 100000  #Blks:  220  AvgRowLen:  10.00
    Index Stats::
      Index: T_INDX  Col#: 2 3
        LVLS: 1  #LB: 237  #DK: 100  LB/K: 2.00  DB/K: 220.00  CLUF: 22000.00
        User hint to use this index
    SINGLE TABLE ACCESS PATH
      BEGIN Single Table Cardinality Estimation
      Column (#2): X(NUMBER)
        AvgLen: 3.00 NDV: 100 Nulls: 0 Density: 0.003424 Min: 0 Max: 99
        Histogram: Freq  #Bkts: 100  UncompBkts: 5403  EndPtVals: 100
      Column (#3): Y(NUMBER)
        AvgLen: 3.00 NDV: 100 Nulls: 0 Density: 0.003424 Min: 0 Max: 99
        Histogram: Freq  #Bkts: 100  UncompBkts: 5403  EndPtVals: 100
      Table:  T  Alias: T    
        Card: Original: 100000  Rounded: 10  Computed: 10.00  Non Adjusted: 10.00
      END   Single Table Cardinality Estimation
      Access Path: index (AllEqRange)
        Index: T_INDX
        resc_io: 4.00  resc_cpu: 33236
        ix_sel: 1.0000e-004  ix_sel_with_filters: 1.0000e-004
        Cost: 4.00  Resp: 4.00  Degree: 1
      Best:: AccessPath: IndexRange  Index: T_INDX
             Cost: 4.00  Degree: 1  Resp: 4.00  Card: 10.00  Bytes: 0To give a complete picture, this is 10053 excerpt for "normal stats" + disabled bug fix + forced index:
      BEGIN Single Table Cardinality Estimation
      Column (#2): X(NUMBER)
        AvgLen: 3.00 NDV: 100 Nulls: 0 Density: 0.01 Min: 0 Max: 99
      Column (#3): Y(NUMBER)
        AvgLen: 3.00 NDV: 100 Nulls: 0 Density: 0.01 Min: 0 Max: 99
      Table:  T  Alias: T    
        Card: Original: 100000  Rounded: 10  Computed: 10.00  Non Adjusted: 10.00
      END   Single Table Cardinality Estimation
      Access Path: index (AllEqRange)
        Index: T_INDX
        resc_io: 223.00  resc_cpu: 1978931
        ix_sel: 0.01  ix_sel_with_filters: 0.01
        Cost: 223.18  Resp: 223.18  Degree: 1
      Best:: AccessPath: IndexRange  Index: T_INDX
             Cost: 223.18  Degree: 1  Resp: 223.18  Card: 10.00  Bytes: 0And this one for "normal stats" + enabled bug fix:
      BEGIN Single Table Cardinality Estimation
      Column (#2): X(NUMBER)
        AvgLen: 3.00 NDV: 100 Nulls: 0 Density: 0.01 Min: 0 Max: 99
      Column (#3): Y(NUMBER)
        AvgLen: 3.00 NDV: 100 Nulls: 0 Density: 0.01 Min: 0 Max: 99
      ColGroup (#1, Index) T_INDX
        Col#: 2 3    CorStregth: 100.00
      ColGroup Usage:: PredCnt: 2  Matches Full: #0  Partial:  Sel: 0.0100
      Table:  T  Alias: T    
        Card: Original: 100000  Rounded: 1000  Computed: 1000.00  Non Adjusted: 1000.00
      END   Single Table Cardinality Estimation
      ColGroup Usage:: PredCnt: 2  Matches Full: #0  Partial:  Sel: 0.0100
      ColGroup Usage:: PredCnt: 2  Matches Full: #0  Partial:  Sel: 0.0100
      Access Path: index (AllEqRange)
        Index: T_INDX
        resc_io: 223.00  resc_cpu: 1978931
        ix_sel: 0.01  ix_sel_with_filters: 0.01
        Cost: 223.18  Resp: 223.18  Degree: 1
      Best:: AccessPath: IndexRange  Index: T_INDX
             Cost: 223.18  Degree: 1  Resp: 223.18  Card: 1000.00  Bytes: 0Tests were performed on the same machine (10.2.0.4).

  • SQL statement: select maximal 20 rows of table

    Hi everybody,
    I know taht this is no dedidcated XI question.
    But, does anybody the sql statement for selecting maximal (e.g. 20) rows?
    Regards Mario

    Hi Mario,
    u can use direct SQL Statement with
    action= SQL_QUERY
    Look to <a href="http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm">Document Formats for the Receiver JDBC Adapter</a>
    Regards,
    Udo

  • Photoshop Button in Active State Returns to Normal After Rollover?

    Hello,
    I'm working on a glossary reference website in Muse, and have hit a roadblock with my photoshop buttons.
    I have created menu buttons in Photoshop that have two different states - one for active and rollover, and another for normal and down (the button is actually saved with four different layers/states, one for each, but for what the user will see, it's really only two options). I've used these menu buttons as rollover triggers for blank compositions, and when the user rolls over the button, the name of the page appears below it, and then disappears on rollout (otherwise the names would overlap and it would look very cluttered).
    The issue that I have found is that, when I preview the page in my browser, the buttons appear to function properly in that they show up in the active state indicating that the page that they are linked to is the one that they are on.
    Initial View - Home Page:
    ...and when I rollover the image of the page that I am currently on, the button shows the name of the page as desired, like so:
    However, when I rollout, the button reverts back to the normal/down state, even though I am still on the home page.
    Below is a screenshot of the composition settings that I have set up for this widget. I tried switching the "Hide Target" to none, but since the target is referring to the word "Home", the word "Home" remained visible in addition to the button remaining in the active state, which is not what I want. I also tried selecting "Triggers on Top", but the issue was not solved here either.
    What am I missing? How can I make sure that my button remains in the active state when on the page that it is linked to?
    Thanks for your help!
    Rachel

    Sounds like a bug that's the fallout of the overloaded meaning of "Active" state. "Active" is both the state used for an item with a hyperlink applied that points to the current page (or an anchor point in the current scroll range on the current page) and the state used for a trigger or thumbnail in a Composition or Slideshow widget that corresponds to the a current active item in the composition or slideshow.
    It appears we honor the hyperlink definition of "Active" on page load for a composition trigger with a hyperlink to the current page applied, but don't honor that definition of active when transition to having no items in the composition active (or presumable when transition to having a different item in the composition active).
    The only workaround that comes to mind would be the very tedious approach of replicating this composition widget on each page, removing the hyperlink on the "active" trigger and manually formatting it's "Normal" state to appear active.
    I've written up the bug. However, it may not get fixed immediately. (We tend to collect smaller fixes in an area and then address them all at once or when other changes are planned in that area, due to the overhead involved in ramping up to work on an area and thoroughly retest it after changes.)

  • UDLD Normal Question

    Hi all,
    I need some clarification on UDLD please.  I have always used UDLD aggressive mode and understand that with no issues.  What I am not clear on is exactly what UDLD does in normal mode.  According to the Cisco documentation,
    "In normal mode, if the link state of the port was determined to be bi-directional and the UDLD information times out, no action is taken by UDLD. The port state for UDLD is marked as undetermined.  The port behaves according to its STP state."
    If no action is taken in normal mode, is there any value in using it?
    Thanks,
    Bill

    Hi Bill,
    The UDLD is sadly underdocumented in several sources, and even the informational RFC does not contain all the necessary information to properly understand UDLD modes.
    The truth is, according to U.S. Patent 6765877, that there are two ways in UDLD of detecting an unidirectional link: an explicit and an implicit method. To understand the explicit method, it is important to keep in mind that each switch indicates its own [Device ID, Port ID] tuple as the sender information in an UDLD message, and echoes back the [Device ID, Port ID] tuples received from its neighbors in an echo portion of the message. In other words, each UDLD message carries a device and port identity of its sender, and contains an echo list of all neighbors and their ports whose UDLD messages have been received on the port that sends out this UDLD message itself.
    An unidirectional link is detected explicitly if one or more of the following events occur during the neighbor detection and linkup phase:
    UDLD messages received from a neighbor do not contain the tuple that matches the receiving switch and port in their echo portion. This would indicate a split fiber or a truly unidirectional link.
    UDLD messages received from a neighbor contain the same sender as the receiving switch and its port. This would indicate a self-looped port.
    UDLD message received from a neighbor contain a different list of entries in the echo portion (i.e. a different set of neighbors) than the set of neighbors heard by this switch on this port. This would indicate a shared segment with a partial impaired connectivity between connected switches.
    Whenever any of these three events is observed during an UDLD neighborship buildup with a neighboring switch, the link is declared unidirectional and subsequently disabled. Once again, this is called explicit unidirectional link detection. The setting of aggressive or normal mode has no effect on explicit detection.
    An implicit unidirectional link detection refers to the event when UDLD messages arriving from the neighbor device suddenly cease to be received, without the port actually going down. This is where the aggressive or normal UDLD modes make a difference. In the normal mode, you simply age out the neighbor and do nothing, hoping that if there was a physical unidirectional fault on the link, the physical and link-layer mechanism would have brought the link down anyway. In aggressive mode, you assume that the physical layer has no capability of detecting and dealing with the unidirectional link condition itself, and when UDLD messages stop arriving, you err-disable the port just to be safe.
    So the difference between the normal and aggressive modes relates to the difference in handling an implicit uni-directional link event. If an uni-directional link is detected explicitly, the port will always be err-disabled, regardless of the normal/aggressive mode.
    The related U.S. Patent is a good, albeit tiresome, reading on this, especially the Figure 7 with the decision diagram; check out this thread:
    https://supportforums.cisco.com/thread/2179927
    Best regards,
    Peter

  • My sons dad bought him and ipod and my niece used her itunes library to add music and videos on it. They live in another state and we have questions because we don't want him to lose all of the music or any of the apps.

    My son's dad bought him an ipod and my niece used her itune library to put music and videos on his ipod. The problem we are haveing is that she lives in another state and we are not sure how to manange his account without losing some of the songs and all of his apps. There are some songs that are on his ipod that are duplicates, there are some songs that he doesn't like or listen to, and there are some songs on there that I do NOT want him to listen to because of the language and the lyrics. He is 10 there are just some things I feel that he is too young to listen to.

    Welcome to the Apple Community.
    You can use different ID's for iTunes and iCloud.
    Just delete the account in settings > iCloud and create them their own account.
    if the children are minors, you wiil need to create and be responsible for each account yourself.

  • Extended Analytics Flat File extract question

    I have modified the Extended Analytics SDK application as such:
    HFMCONSTANTSLib.EA_EXTRACT_TYPE_FLAGS.EA_EXTRACT_TYPE_FLATFILE
    instead of
    HFMCONSTANTSLib.EA_EXTRACT_TYPE_FLAGS.EA_EXTRACT_TYPE_STANDARD
    I am trying to figure out where the Flat file extract is placed once the Extract is complete. I have verified that I am connecting to HFM and the log file indicates all the steps in the application have completed successfully.
    Where does the FLATFILE get saved/output when using the API?
    Ultimate goal is to create a flat file through an automated process which can be picked up by a third party application.
    thanks for your help,
    Chris

    Never mind. I found the location on the server.

  • PS CS3 extended "load files into stack" question

    Hi,
    I've been trying to use the "Load files into stack" script in PS CS3 extended but the problem is that if for example I have files with these names:
    File_1
    File_2
    File_3
    when I use the script it puts them together but in the wrong order so in my layers they are like this:
    File_1
    File_2
    File_3
    which would be wrong because the File_1 is my first image but it's the last layer so if I make this into a gif file and watch it, it would play backwards.
    I was wondering if there is away to fix this. thanks in advance.
    PS: If there is anything I need to provide to make it easier for you to help me, please ask.

    Thank you jugenjury for your fast replay, but let me explain what exactly I'm doing maybe it helps, I'm not very familiar with PS so I'm kinda confused about what you just said.
    I'm trying to make a .gif from an .avi file. I tried using the File>Import>Video Frames to Layers but I get all blank layers so I used another program to take mass screen shots. so I have 133 images which I want to make into a .gif file. I use the Load files into stack script then in the animation tool I select the "make frames from Layers". It all works out so far but the problem is that the video plays backwards because of the problem I explained in first post.

  • SQL Statement as Loop - easy question?

    Am reading from S. Feuerstein's book:
    DECLARE
    CURSOR checked_out_cur IS
    SELECT pet_id, name, checkout_date
    FROM occupancy WHERE checkout_date IS NOT NULL;
    BEGIN
    FOR checked_out_rec IN checked_out_cur
    LOOP
    INSERT INTO occupancy_history (pet_id, name, checkout_date)
    VALUES (checked_out_rec.pet_id, checked_out_rec.name, checked_out_rec.checkout_date);
    My question is - where did checked_out_rec came from? Doesn't look like it's declared.
    Thanks,

    http://www.unix.org.ua/orelly/oracle/prog2/ch07_07.htm
    In fact the very next section begins,
    "This will work just fine. But do we really need to use a cursor FOR loop to accomplish this task?"
    (I think the above is from an earlier edition of the book, but later editions make the same point.)
    If you flip back a couple of pages there is whole section on the convenience of the implicit record declaration, along with the implicit open, fetch and close.

  • SQL Statement for Post-Interview Question

    Hello,
    I was recently asked a question for an interview and think I got (part of it) wrong, but here is the question followed by my query with output. If someone could show me where I went wrong I would greatly appreciate it. It would be a great learning experience
    for me. I think where I fell short was the count of each repeating output row.
    Q: There is a table called Member with three columns: MemberID, FirstName, and LastName. We need a query to find how many First Name and Last Name combination duplicates exists. 
    The desired output is  First Name, Last Name, total number times the combination is repeated.  
    •        BONUS question 1:  Have the result set with the largest number of duplicates first. 
    •        BONUS question 2:  What do you do if there are extraneous leading or trailing spaces on each name cause the same first name last name combination showing up on multiple lines?
    SELECT * FROM (
    SELECT (ROW_NUMBER() OVER (
    ORDER BY  a.LastName, a.FirstName, a.MemberID DESC
    )) AS ROWNUM
    , a.MemberID
    ,  rtrim(ltrim(a.LastName))
    ,  rtrim(ltrim(a.FirstName))
    , a.name
    FROM User_Details AS a INNER JOIN
    (SELECT  rtrim(ltrim(LastName)), rtrim(ltrim(FirstName))
    FROM User_Details
    WHERE LastName !='' AND FirstName != '' 
    GROUP BY LastName, FirstName
    HAVING
    (COUNT(*) > 1)) AS b ON  rtrim(ltrim(a.LastName)) =  rtrim(ltrim(b.LastName)) AND  rtrim(ltrim(a.FirstName)) =  rtrim(ltrim(b.FirstName))
    WHERE 0=0
    --first placeholder condition
    ) AS TEAM_OUTPUT
    WHERE ROWNUM BETWEEN 1 and 100
     Output:
          123456       Allen       Michael
          123456       Allen       Michael  
          46683        Allen       Michael
          46683        Allen       Michael       
          71795        Allen       Mike
          71795        Allen       Mike 
          32171        Allen       Mike
          32171        Allen       Mike 
          38058        Allen       Patricia
          32524        Allen       Patricia
          211454       Allen       Susan
          34679        Allen       Susan
          29826        Allen       Susan
          39684        Allen       Teri       
          77557        Allen       Terri       
          227006       Allen       Theresa
          107360       Allen       Theresa
    Thanks,
    Buster

    Shouldn't it be as simple as
    SELECT FirstName, LastName, COUNT(*) AS C
    FROM Member
    GROUP BY FirstName, LastName
    HAVING COUNT(*) > 1
    ORDER BY COUNT(*) DESC
    (add the LTRIM AND RTRIMs back in to deal with the possible extra spaces)

  • US Extended keyboard layout map and question

    Hi,
    I am not on a Mac now, that's why I ask:
    1. I need a map of the Apple US Extended keyboard layout, esp. how it works with the special characters and dead keys; where do I get this?
    2. Which extended key combinations do you press simultaneously, and which do you press one after the other? So called dead keys.
    I want to have this layout on a Windows computer. I know how to create any keyboard layout in Windows, perhaps there is a way to export the layout from OS X with a single click?

    traktor15 wrote:
    I was able to replicate the special characters in gray
    but not the special characters (the dead keys?) in orange.
    Yes, an orange key is a "deadkey".  You type it and then you type the base letter to get the accented version.  For example, on US Extended, option/alt plus a, then o, will give you ō (o macron).
    I don't know how one creates deadkeys with the MKLC.  They are found also in Windows layouts like US International, where ' is a deadkey for acute accent.

  • A normal question regarding array threhold function

    Hi, i try to use the array threshold vi function but faced some problems. Pls see my VI. I can only a threshold result but can't get the other. Hope anyone could help me. Thanks
    Attachments:
    Test1.vi ‏37 KB

    The Threshold 1D Array function is looking for a rising edge across your threshold. Since your first array only contains falling data points the threshold function never finds a valid transition.
    See the LabVIEW help file for more detailed information about the threshold function.
    Christian L
    NI Consulting Services
    Christian Loew, CLA
    Principal Systems Engineer, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

  • A normal question on programming

    When programming, samples are very important. When I get a new function of java,
    how can I find some samples of it. The java language specification is very useful, but
    it doesn't include code samples.
    Please recommend a good way or a good place to solve this problem.
    Thanks.

    Thanks for your reply.
    It is very useful.
    Is there something like a sample code search engineering?
    For example, I have a method, and I want some sample code for it?
    Is that possible?

  • How to change properties of an image when the state changes? (normal, rollover, mouse down, action)

    I want to enlarge image (photo) while rolling over.

    Sure, This works but copying back the button does not replace the original, it just adds a new button, so for every change, there is a new copy added. I did notice this when I wanted to change the size of the button, they were both visible !
    Pierre

Maybe you are looking for

  • Quota generation in IT2006

    Hello Experts. need your help in this issue, i am running time evaluation with schema ZM00 where annual leave quota is generated with TE. my problem here is that the quota is being generated on a monthly basis with 1.25 day/month and it is showing in

  • How can I create an expandable text field in Acrobat XI?

    I am trying to create a text field that expands with the text that is entered. I have found several forums saying to use subforms, but how do I create those? Does anyone know where I can find a really good turtorial for XI?

  • Lights not working, for anything!

    I'm trying to make a cool video with some models from a video game, one of them is a giant robot, and I imported that into Element 3D with it's diffuse texture so I can composite it inside of after effects. The only problem is that lights don't work

  • What does it take to run Boot Camp, Fusion or Parallels

    I am wondering about upgrading to Leopard to use Boot Camp, Fusion or Parallels. I have found that a significant amount of software that I want to run is not available in a Mac version. The other issue is that many programs I already have for Windows

  • Mirrored pics

    Hi, got a problem. My stills taken with external iSight webcam in Photo Booth application are always mirrored (right side is left and vice versa) even though no effects are turned on. How to make pictures look right (real)? Can you solve this? Thanx