This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 148671

Summary: Frame has become Stage
Product: javafx Reporter: Lark Fitzgerald <lfitzgerald>
Component: UnsupportedAssignee: Michal Skvor <misk>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: Windows Vista   
Issue Type: DEFECT Exception Reporter:

Description Lark Fitzgerald 2008-09-29 19:54:56 UTC
Tested using FX Cont trunk build 258 with SDK:
Product: javafx-1.0dev Platform: windows-i586 Build-Number: 443 Build-ID: 2008-09-29_05-10-40 on NB6.5: 
Product Version: NetBeans IDE Dev (Build 20080922)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b14
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)

Palette > Applications > Frame has invalid source
1. DnD of Frame onto editor gives:

import javafx.stage.Frame;
import javafx.scene.Scene;

Frame {
    title: "MyApplication"
    width: 200
    height: 200
    closeAction: function() { 
        java.lang.System.exit( 0 ); 
    }
    visible: true

    scene: Scene {
        content: []
    }
}

It should now be:

import javafx.stage.Stage;
import javafx.stage.Decoration;
import javafx.scene.Scene;

Stage {
    decoration: Decoration { title: "MyApplication"}
    width: 200
    height: 200
    visible: true

    scene: Scene {
        content: []
    }
}


Note, that I'm gray on closeAction so I removed it

    closeAction: function() {
        java.lang.System.exit( 0 );
    }

Since it doesn't have a equivalent in Stage, but there should be a FX.exit(), FX.addShutdownActions() and 
FX.removeShutdownActions() equivalent somewhere.
Comment 1 Michal Skvor 2008-09-30 09:28:30 UTC
Fixed.
Comment 2 Alexandr Scherbatiy 2008-09-30 11:52:50 UTC
verified in 2008-09-30_13-16-37.zip