Component Invisible at Canvas

When I try to drag and drop a component in the canvas, the component is invisible is in the canvas, but is available at Object Browser. Kindly help me find  a solution.
Regards
Ranendra

Hi
select that component and right click and  select BRING TO FRONT
the order in OBJECT BROWSER matter

Similar Messages

  • Swing component for awt.canvas

    Hi,
    Can anyone tell me the equivalent SWING component for awt CANVAS. I need it because i need to display only Images (nothing else) on it. If anyone can tell how I can do it.

    JPanel is the Swing-equivalent of java.awt.Canvas, but if you are just displaying images, you can use the JLabel class, which supports use of images as icons (see also ImageIcon class).
    Mitch Goldstein
    Author, Hardcore JFC (Cambridge Univ Press)
    [email protected]

  • Making a component invisible...

    Hi,
    I'm trying to make a component in my movie invisible using
    the instance._visible = false ActionScript command. It's a button
    that was converted to a symbol from a series of filled rectangles
    and ovals. It will not go invisible although I can use the same
    script on a simple, independent text-box and it works fine. Am I
    missing something?
    Thanks in advance - Jim.

    Thanks for responding. It's working. But I still have some
    minor questions.
    1) When I put the code within the onMotionFinished function,
    it doesn't work. But when I place it at the very beginning (before
    the tweening), it works. Why is this?
    2) Also, what is the difference between using:
    this._visible = false; versus
    this.red_mc.triggerBox_red_btn._visible = false; or just
    red_mc.triggerBox_red_btn._visible = false;? The latter 2 do
    not work. Why is this?
    thanks you very much for your help.
    Here's the modified snippet with the new code:

  • Painting a Component on a Canvas

    Hello communtiy :)
    I'm creating a program to view images on an old laptop remade as a digital photo frame running Ubuntu. Seeing as I'm dealing with Linux I want the program to use AWT rather than Swing. I use a java.awt.Canvas to display the image, which works fine, but now I want to add a description to each image. I thought I'd do this by adding the description text to a TextArea and then draw the TextArea somewhere on the Canvas, so as to get the line wrap for free. This is where I'm stuck.
    So, I want to paint a java.awt.TextArea on to a java.awt.Canvas but I can't get the TextArea to show. The dummy code below shows only the text drawn by g.drawString(String, int int), not the one from textArea.paint(Graphics). What am I doing wrong?
    Frame frame = new Frame();
    frame.add(new java.awt.Canvas(){
        public void paint(Graphics g){
             g.drawString("g.drawString", 20, 20);
              java.awt.TextArea textArea = new java.awt.TextArea("TextArea");
              textArea.paint(g);
    frame.pack();
    frame.setVisible(true);Kind Regards

    The old AWT classes work through peers, where there is a heavyweight OS component (like a frame) underlying the AWT component. The problem with this, as you are finding, is that it is extremely limiting. In almost all cases, you can't change how it looks (overridding paint does nothing) or override its default event handling. And calling paint on an AWT class with an Image graphics object paints nothing, so you either have to replicate how your AWT class paints it thru code somehow, or not use AWT.

  • MXML component invisible in screen after exceeds screen height,help in Scroller

    hi
    i am new to mxml. i am devloping playbook applucation using MXML.
    playbook height is fix 600 and width 1024 in lanscape and in potrait its height and width are reverse.
    i have long content to display but after y=600 i don't able to see any component on MXML
    i add scroller in MXML then also it not able to display all content.
    in MXML all component have x and y co-ordinate associate with it so when y exceeds 600 no component is display on then screen.
    so how to add component to scroller and able to display on the screen
    Thanks &  Regards.
    Megha

    Thanks Peter, but I've given that a go already.
    I'm looking into trying to get the component instantiated
    through MXML, and then returning it using it's ID. If another
    container addChilds it, then the component will be removed from the
    (temporary) display list it was previously added to (simply for
    instantiating), correct?
    I think these layout issues are only when I instantiate it in
    actionscript, but further poking should reveal the truth....

  • Make a component invisible after all tabs in a tabbed pane are closed

    Hi,
    I am using a tabbed pane and open images in tabs. I want to disable a comonent after i find all the tabs of the tabbed pane closed and when all the tabs are closed the tab pane should also be closed.
    Please help me.

        TabPane tabPane = new TabPane();
        tabPane.getTabs().addListener(new ListChangeListener<Tab>() {
          @Override
          public void onChanged(
              javafx.collections.ListChangeListener.Change<? extends Tab> c) {
            if (tabPane.getTabs().isEmpty()) {
             // whatever you need here:
             // somePane.getChildren().remove(tabPane);
             // someControl.setDisable(true);
        });

  • 2 tab canvasses on a single window (form)

    Hi !
    Does anybody know of a way to put 2 tab canvases on a single window. I would like to place 2 tab canvases, each holding 2 tab pages, on 1 window. However, from the moment you use "new tab canvas page" he directly puts the page behind the other tab pages instead of starting a new one. I already tried working with stacked canvases or "new content canvas". Even if your new tab canvas page is inside a new canvas he keeps on putting the tab pages behind the previous tab pages.
    Would anybody know of a workaround ?
    Many thanks !
    Kris

    Hi Saeed,
    A possible solution to generate two tab canvasses on one window is the following:
    Add a (dummy) module component with (dummy) items between the last module component of the first tab and the first module component of the second tab.
    At runtime, you can make this extra module component invisible.
    So, in Designer you'll have the following Module Components, with property 'Placement':
    MC1. 'New Tab Canvas Page' -- first tab-page of first tab
    MC2. 'New Tab Canvas Page' -- second tab-page of first tab
    MC3. 'New Content canvas' -- dummy block, between two tab canvases
    MC4. 'New Tab Canvas Page' -- first tab-page of second tab
    MC5. 'New Tab Canvas Page' -- second tab-page of second tab
    HTH,
    Lennart de Vos

  • Not able to see components on Xcelsius canvas

    Hello friends,
    Sometimes when I am in design mode of Xcelsius 2008, I am not able to see any component on my canvas but they are all in my component panel as well as I can see all functioning properly when I do the preview or export it to SWF. Since I am not able to see components on canvas, I canu2019t make any changes to my existing dashboard and its a show stopper for me. Is it known issue? any service pack or fix pack available for this error? Is this cause of size of XLF file or due to any limitation on number of components on canvas?
    How is my dashboard:
    My dashboard has a tab control with 6 tabs.
    Each tab has 1 accordian, 3 pie charts, 3 list views, 1 line chart, Many checkboxes, and a pair of radio buttons. Format of each tab is exactly same.
    Size of my XLF file now is 1.5 MB
    What I tried:
    I checked that global invisible button is not checked.
    I tried closing xcelsius and opening it again with same XLF file.
    I tried deleting registries folder from machine and restarting machine.
    I tried unistalling Xcelsius and install again.
    I tried the same with SP1.
    but no success till now. Any pointers will be appreciated.
    Thanks.

    Hi,
    I would suggest you posting this in the Xcelsius forum.
    Ingo

  • How to move multiple components into a Tab Component and still keep layout?

    I have created a Combination Chart with multiple combo boxes and a slider on my Xcelsius Canvas.  Now, I realize that I want to put all of this into a Tab Set Component.  How can I move everything into this new Tab Component without messing up all the layout and alignment I have done on all my components already?  I tried shift-selecting everything and doing a drag --> drop into the Tab Canvas but they just all stack on top of each other.
    Can this be done?  Would it be wiser to start a new Xcelsius document, place a Tab Set Component on the canvas and then copy --> paste from the original document into the new one? I'm reluctant to do this though (even within the same document) because it forces all components to be renamed back to their defaults such as Chart 1, Combo Box 1, etc etc.
    Edit:
    Bolded my biggest concern on this topic, can components be copy/pasted or cut/pasted and still retain their original name?

    i think this scenario would work fine for you
    choose all the components you want to move from the "Object Browser"
    you can show the Object Browser from the View Menu
    after you select them all, you can drag them to your Tab component
    or you can make them as a group, so it will be easy to move them as the same layout they have.
    to make them as one group
    select them all, go to format menu, and select Group
    now you have all of them as one item, move them to the tab and then you can ungroup them the same way
    good luck
    Amr

  • Alternative to Double-Buffered Canvas

    I am working on a program in which I use a double-buffered Canvas inside a JScrollPane. The problem is that the Canvas draws over the scrollbars. I have tried extending JComponent, JPanel, JApplet, and Component instead of Canvas, and none of them are double buffered. Here is the code I used to debug this problem:
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class Test implements  Runnable
         JFrame f;
         JScrollPane scroller;
         JPanel panel;
         TestCanvas canvas;
         Thread runner;
         BufferStrategy strategy;
         public static void main (String[] args) {
              Test app = new Test();
              app.init();
         public void init() {
              f = new JFrame();
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              panel = new JPanel();
              canvas = new TestCanvas();
              panel.add(canvas);
              scroller = new JScrollPane(panel);
              scroller.setWheelScrollingEnabled(true);
              f.getContentPane().add(scroller);
              f.pack();
              f.setSize(300,300);
              f.setVisible(true);
              canvas.createBufferStrategy(2);
              strategy = canvas.getBufferStrategy();
              runner = new Thread(this);
              runner.run();
         public void run() {
              int x = 0;
              while(x != 65536) {
                   Graphics2D g = (Graphics2D)strategy.getDrawGraphics().create();
                   g.setColor(new Color(x%256,0,0));
                   g.fill(new Ellipse2D.Double(0,0,600,600));
                   strategy.show();
                   x++;
    }Any suggestions?

    The main culprit is that you are mixing AWT components with Swing ones.
    In addition, your are doing so many of useless things and wrong things in your code.
    Swing components are defaulted for using double-buffering.
    See: http://java.sun.com/products/jfc/tsc/articles/painting/index.html
    Try and study this code.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class Fox1229{
      JFrame f;
      JScrollPane scroller;
      TestCanvas canvas;
      int x;
      Timer t;
      public static void main (String[] args) {
        Fox1229 app = new Fox1229();
        app.init();
      public void init() {
        x = 0;
        f = new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        canvas = new TestCanvas();
        scroller = new JScrollPane(canvas);
        scroller.setWheelScrollingEnabled(true);
        f.getContentPane().add(scroller, BorderLayout.CENTER);
        f.setSize(300, 300);
        f.setVisible(true);
        t = new Timer(50, new ActionListener(){
          public void actionPerformed(ActionEvent e){
            canvas.setOc(new Color(x % 256, 0, 0));
            canvas.repaint();
            if (++x == 1024){
              t.stop();
        t.start();
    class TestCanvas extends JPanel{
      Color oc;
      public TestCanvas (){
        oc = new Color(0, 0, 0);
      public void setOc(Color c){
        oc = c;
      public Dimension getPreferredSize(){
        return new Dimension(600, 600);
      public void paintComponent(Graphics g){
        super.paintComponent(g);
        Graphics2D g2d = (Graphics2D)g;
        g2d.setColor(Color.blue);
        g2d.fill(new Rectangle(0, 0, 600, 600));
        g2d.setColor(oc);
        g2d.fill(new Ellipse2D.Double(0, 0, 600, 600));
    }

  • FocusOut in a custom component

    Hi.
    I made a custom component using a Canvas with a TextInput and a Button inside.
    I need to make a focusOut event to be called when the focus go out of my custom component, but not be called when the focus change beetween the inputtext and the button inside the canvas.
    How can I do that?
    Tanks.

    Hi this is simple.Please try this sample.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:Cn="*" creationComplete="Init()">
        <fx:Script>
            <![CDATA[
            import flash.events.Event;
            import mx.controls.Alert;
            private function Init():void
                objTemp.addEventListener("FocusOut", FocusOutHandler);
            private function FocusOutHandler(event:Event):void
                trace("CanCom's focus out");
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
    <s:HGroup>
        <s:TextInput></s:TextInput>
        <Cn:CanCom id="objTemp"></Cn:CanCom>
        <s:TextInput></s:TextInput>
    </s:HGroup>
    </s:Application>
    _____________________________________ CanCom.mxml ______________________________________
    <?xml version="1.0" encoding="utf-8"?>
    <s:HGroup xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/halo">
        <fx:Script>
            <![CDATA[
            import flash.events.Event;   
            private function FocusOutHandler(event:Event):void
                try{
                if (this.getFocus() == btnTemp || this.getFocus().parent.parent == txtTemp)
                    return;
                }catch (err:Error) { }
                dispatchEvent(new Event("FocusOut"));
            ]]>
        </fx:Script>
        <s:TextInput id="txtTemp" focusOut="FocusOutHandler(event)"></s:TextInput>
        <s:Button id="btnTemp" focusOut="FocusOutHandler(event)"></s:Button>   
    </s:HGroup>

  • Help with creating a custom component.

    Hi. I have created a really simple custom component called
    myComp. It is a simple Canvas 100 pixels x 100 pixels with an Image
    control component.
    <mx:Canvas>
    <mx:Image id="image1">
    </mx:Canvas>
    After instantiating the component in Main.mxml eg. var
    pic1:myComp = new myComp(); I am having a problem setting the
    source property of the Image component.
    "image1" is the id of mx:Image in the custom compoenent so I
    tried pic1.image1.source = "assets/ball.jpg" but I get a run time
    error "Error #1009: Cannot access a property or method of a null
    object reference".
    Don't really know what I am doing wrong.
    Any help please!

    In your custom component, try adding a bindable public var
    which contains the path to your image. Also, set the image.source
    to this var.
    In your main app, set the var within the <mx:> tags of
    the custom component. Since it is a public var, it will show up in
    the code hint. You can also now change the image var from the main
    app anytime you like using ActionScript code.

  • How to draw an Image on a BufferedImage in a class that is not a Component?

    I have an Image object loaded from a file using Toolkit, I want to draw it on a BufferedImage using g.drawImage( x, y, width, height, ImageObserver );
    later on I want to save the BufferedImage in a jpeg file using the converter.
    Since my class is not a subclass of Component (Panel, Applet, Canvas... ) what do I pass along as ImageObserver, nothing seems to be working, I can draw anything using g.draw... except an Image.
    Thanks...
    Fco. Espaillat

    Try extending ImageObserver. You only have to implement one method, and its hardly an implementation. I ussually have that method return true regardless of what is going on and it works.
    But to discourage bad programming style does anyone there know what that method is suppossed to return and how to find that out?

  • Custom Component Error -- Uggh

    I have tried to solve the problem using online resouces, 3rd party message boards, Xcelsius tutorials, the textbook "Xcelsius 2008: Dashboard Best Practices", tutorials which came with the Xcelsius SDK, among others, however, I continue to run into problems. Additionally, I am have tried to fix by reading the Flex 3 SDK, Xcelsius 2008 SDK, and the samples for Xcelsius/Flex which came bundled in the SDK.
    The problem is that the custom component, created in Flex 3 Hotfix and brought into Xcelsius using the Add-on Packager and the Add-on Manager does not display on the canvas. While all of the inherent components in Xcelsius work correctly the custom component does not display. When dropped on the canvas it simply disappears and never instatiates on the canvas and also is not listed inside the object browser. The custom component is, however, listed in the vertical menu under the category Add-Ons.
    Example:
    1. I use a sample Flex project which was included in the Xcelsius SDK and bring it into Flex 3 builder.
    2. I configure the project to run appropriately in my local environment
    3. I build the project successfully.
    4. I open the Xcelsius Add-on Packager
    4a. In the GENERAL tab I give the package a name
    4b. In the VISUAL tab I type the name of the class (i.e. com.business.dept.project )
    4c. In the VISUAL tab I type the display name (i.e. Email Component)
    4d. In the VISUAL tab I type the directory location of the .swf (i.e. C:\Xcelsius\Flex\Project\Email\emailcomponent.swf )
    4e. In the VISUAL tab I type the directory location of the property sheet (i.e. C:\Program Files\Business Objects\Xcelsius\SDK\bin\propertyinspector.swc )
    4f. In the BUILD tab I build the component sucessfully
    5. I open Xcelsius and go to File -- Manage Add-Ons
    6. I add the new emailcomponent.xlx file to the Add-on Manager and select Close
    7. I exit Xcelsius and reopen Xcelsius
    8. The new component is listed in the vertical menu under Components -- Add-Ons
    9. I test the function of inherent objects and drag a pie chart successfully onto the canvas of Xcelsius
    10. I drag my new component onto the canvas, and while there is a visible border outline of the object as I drag over the canvas, when I drop the component onto the canvas the object does NOT appear on the canvas.
    11. I re-test another inherent componet in Xcelsius which works fine
    12. I re-test my component with the same failure.
    Thank you for the assistance in advance.
    Alex Dove

    I have successfully created a Flex component in Xcelsius. The data is static and hard coded into the Flex component which is not ideal, but it certainly is a step in the right direction.
    My steps were as follows:
    1. Create a new Flex project
    2. Create a new Flex component and save it into the class namespace directory I was planning on using
    3. Include all of the MXML logic for the application in the component file
    4. Reference the component file in the Application file as a namespace reference
    5. Save the file
    6. Create an .xlx file using the Xcelsius Add-on Packager
    7. Typing the class namespace location using the entire path and file name without the extension
    8. Loading the new component into Xcelsius
    9. Building the app.
    Success.
    Thank you for all the help
    Alex Dove

  • Problem about canvas repaint!

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    class DrawPie extends Canvas{
    Container cont;
    public DrawPie(Container parent){
    cont=parent;
    public void addinContainer(){
    this.setSize(200,200);
    cont.add(this,BorderLayout.SOUTH);
    public void paint(Graphics g){
    g.drawString("This is test",20,20);
    public class WelFrame extends JFrame {
    JPanel contentPane;
    BorderLayout borderLayout1 = new BorderLayout();
    // Construct the frame
    public WelFrame() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch (Exception e) {
    e.printStackTrace();
    // Component initialization
    private void jbInit() throws Exception {
    Button btn=new Button("Open");
    contentPane = (JPanel) this.getContentPane();
    contentPane.setLayout(borderLayout1);
    btn.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    btn_actionPerformed(e);
    contentPane.add(btn,BorderLayout.NORTH);
    this.setTitle("Welcome to JBuilder");
    this.setSize(new Dimension(400, 300));
    //Overridden so we can exit when window is closed
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    //File | Exit action performed
    public void jMenuFileExit_actionPerformed(ActionEvent e) {
    System.exit(0);
    void btn_actionPerformed(ActionEvent e) {
    DrawPie dp=new DrawPie(contentPane);
    dp.addinContainer();
    public static void main(String[] args){
    WelFrame wf=new WelFrame();
    wf.show();
    I can't get the text painted when click the button open.But when i resize the Frame,the text appeared.
    how can i get the text painted when i click the button open.Thanks a lot.

    When you add a component to another component, call it the parent component, AFTER YOU HAVE CONSTRUCTED THE PARENT COMPONENT, you need to call the method validate()on the parent component to insure that this component, the parent component, has a valid layout. In your code, you're adding your component which extends Canvas to the parent component which extends JFrame AFTER instanciating it. Hence, you need to call validate() on this parent right after adding the child component. In other words, your method btn_actionPerformed should look like the following:
    void btn_actionPerformed(ActionEvent e) {
    DrawPie dp=new DrawPie(contentPane);
    dp.addinContainer();
    validate(); //or this.validate();
    calling validate() will insure re-arrenging all children correctly according to the parent layout. When you resize your form, validate is called automatically and that's why the child component shows up.
    Without calling validate(), your newly added child component is not resized and located according to the parent layout. it's probably with the size 0,0 and that's why you're not seeing the text.
    I hope I explained it clearly enough

Maybe you are looking for

  • Creating SQL-Loader script for more than one table at a time

    Hi, I am using OMWB 2.0.2.0.0 with Oracle 8.1.7 and Sybase 11.9. It looks like I can create SQL-Loader scripts for all the tables or for one table at a time. If I want to create SQL-Loader scripts for 5-6 tables, I have to either create script for al

  • Error in HRFORM Infonet-Generation

    I have created a new MetaDimension (contains only key-fields, option always read with MetaStar is active) and added it to a new MetaStar (Type: Payroll). Both objects pass the check in the MetaNet builder. When I want to use this MetaStar in my Infon

  • TAXINN Procedure and excise duty condition type Missing

    Hi, We are implementing CIn and found that standard condition based procedure TAXINN and Condition type pertaining to Excise duties (JEXP,JCEP,JECP) and Central sales tax (JCST) are missing.But TAXINJ procedure is available. We need to know whether B

  • TS3991 Is it possible to also access folders on my pc from the ipad?

    Is it possible to also access folders on my pc from the ipad?

  • SQL Server 2008R2 Download Link

    Hi All, After browsing for SQL Server 2008R2 enterprise evaluation edition I came across below link for SQL Server 2008 evaluation but not R2. http://www.microsoft.com/en-US/download/details.aspx?id=1279 Please share me the link if available for SQL