Set visible

hi...i wanna to ask, why all my method after setVisible() in a JDialog would not run?

import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
public class AceRoomsDialog
     extends JDialog
     implements WindowListener, ActionListener, ListSelectionListener, KeyListener
     // my initialization of the component here
          setVisible(true);
          enter.requestFocus();
          getRoomList();
my question is that the enter.requestFocus(); and also getRoomList(); wouldn't run until i close this dialog...why?

Similar Messages

  • Maybe Flex SDK bug: Setting visible of DataGrid item renderers

    Hi all, I'm still a noob at flex but this looks a bit strange to me.
    I've been trying to hide a button renderer in a DataGrid but it just wouldn't hide.  I've been setting visible inside the mxml and also in the the class that extends buttonbut it just wouldn't hide.  I then overloaded the visible property set/get and traced what was setting the property to true and found that inside DataGridBase.as the function setupColumnItemRenderer always sets visible of the renderes to true.
    DataGridBase.as
    protected function setupColumnItemRenderer(c:DataGridColumn, contentHolder:ListBaseContentHolder,
                        rowNum:int, colNum:int, data:Object, uid:String):IListItemRenderer
            var listItems:Array = contentHolder.listItems;
            var item:IListItemRenderer;
            var rowData:DataGridListData;
            item = listItems[rowNum][colNum];
            if (!item || itemToUID(item.data) != uid
                || columnMap[item.name] != c)
                item = createColumnItemRenderer(c, false, data);
                if (item == null)
                    return null;
                if (item.parent != contentHolder)
                    contentHolder.addChild(DisplayObject(item));
                // a space is used if no data so text widgets get some default size
                columnMap[item.name] = c;
                if (listItems[rowNum][colNum])
                    addToFreeItemRenderers(listItems[rowNum][colNum]);
                listItems[rowNum][colNum] = item;
            //[Matt] moved from inside the block above to outside because
            //the item definitely exists at this point, and always needs
            //its data refreshed
            rowData = DataGridListData(makeListData(data, uid, rowNum, c.colNum, c));
            rowMap[item.name] = rowData;
            if (item is IDropInListItemRenderer)
                IDropInListItemRenderer(item).listData = data ? rowData : null;
            item.data = data;
            item.visible = true;
            if (uid && colNum == 0)
                contentHolder.visibleData[uid] = item;
            return item;
    Why does it do this?  Shouldn't it respect the visible property already set for the renderer in mxml and not force it to true on init?

    Renderers use the visible property for recycling.  Invisible renderers are not supported.  The hit detection logic would find it the cell it belongs to even if it was invisible.  You can set alpha=0, but it won't stop the hit detection logic.
    Why are you trying to hide a renderer?
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Restoring af:selectBooleanCheckbox value after setting visible=true

    Using JDev 11.1; I have a table that displays data from a model object, and one of the columns contains true/false values which we render in the table using an af:selectBooleanCheckbox. All works fine except that user is able to hide the table by expanding other components which sets visible=false on the bounding component for the table. If user elects to redisplay the table by reducing the other component zoom, then the table displays again but the selected check-marks/tags do not return.
    Thought initially it might've been because the query was being reissued on the table, but not so. More about the selected attribute on the af:selectBooleanCheckbox, which I have set to the default (false). So the value property is set to the table collection attribute as required to interface with the model, but I need to know what to set the selected attribute to. I can see that when the table is redisplayed, this default value of false is being sent through to the model which is discarding the values I want to retain.
    I've tried some EL in the selected property to set it to true/false based on what's in the table, but the problem with that is that it becomes essentially a read-only control. I need to find some way to disable the value assignment when making the table visible again. Any suggestions?
    Thanks,

    Andrefs,
    In ADF BC, one way we deal with this is by adding a transient Boolean attribute to the View Object with getters (translate 0/1 to false/true) and setters (vice-versa). Then, we bind the UI to the transient attribute. It's been so long since I've done EJB's, but could you take a similar approach?
    John

  • To set Visibility for KM Documents

    Hi
    I uploaded some documents in knowledge Management. Now i want to set visibility for those documents, country wise. That country name is not in the list. How can i add the particular country?
    Thanks,
    Kusuma

    Hi,
    When you create repository to upload documents in knowledge management administration there are certain features are displayed which you can define for your repositories. So, please check there if country option is available. I would prefer to create different repositories for different country as administration will becomes eaiser.
    Thanks
    Sunny

  • Set visible=false in Label not removing its space in screen

    Hi All,
    I have three labels ony by one having width=100% for all.
    For some reason, now I want to make 2nd label invisible in
    the screen.
    So I set visible="false" for the 2nd label. Now I cannot the
    see the text displayed by the 2nd Label, but I can see the space
    occupied by the Label.
    I mean that, now i am getting the first label text, and have
    blank row which has the text earlier, but not now and thrid row
    with 3rd label text.
    Also I checked that, if I set the height of the 2nd Label to
    0 then also its not completely removing the 2nd row, only
    possibility I found was completely comment the code for the 2nd
    Label is the only way to hide the 2nd row :)
    Any help would be appreciated.

    Hi Sujit,
    Thanks for giving an useful tip which is new to me. But still
    I can see a little space between the first and 3rd label.
    Now this little space comes from the default space between
    the controls. After few trials I found that there is a property
    called "verticalGap" for the containter which holds these 3 labels.
    I set the value to 0(zero) for verticalGap. Now the issue resolved
    Thanks for a useful post

  • Subform Set visible in Design View and not PDF preview

    I have created a form and used several subform sets, all of the sets and subforms within it are set to visible, but when I look at the PDF preview and when I upload the form into my internal system some of the sections are missing. I am not sure what is wrong, can someone please help!?

    A subformset is used when you have numerous different subforms that can be laid down but the imbound data stream will determine which subform to lay down. For exmple if you have a form that has a a different verbiage based on state then you can have all of the subforms defined that could possibly go there then when the data is merged the state is derived and only the one for that state is used.
    Hope that helps
    Paul

  • ArrayIndexOutOfBoundsException when setting visibility to the caret

    Hi all,
    I made a JTextPane and run into some problems. I get an ArrayIndexOutOfBoundsException when I'm setting it's caret visibility to true and false:
            JEditorPane textPane = new JTextPane;
            // add the textPane to a frame's ContentPane   
         public void test() {
              for(int i = 0; i<100;  i++) {
                   testVisibility(true);
                   testVisibility(false);
         private void testVisibility(boolean b) {
              // This is were the exception will be thrown if the text pane is visible
              // when making these calls.
              textPane.setEditable(b);
              textPane.getCaret().setVisible(b);
         }The snippet throws an ArrayIndexOutOfBoundsException:
    java.lang.ArrayIndexOutOfBoundsException
         at java.lang.System.arraycopy(Native Method)
         at javax.swing.text.BoxView.updateLayoutArray(BoxView.java:197)
         at javax.swing.text.BoxView.replace(BoxView.java:168)
         at javax.swing.text.View.append(View.java:432)
         at javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:412)
         at javax.swing.text.FlowView.layout(FlowView.java:184)
         at javax.swing.text.BoxView.setSize(BoxView.java:379)
         at javax.swing.text.BoxView.updateChildSizes(BoxView.java:348)
         at javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:330)
         at javax.swing.text.BoxView.layout(BoxView.java:682)
         at javax.swing.text.BoxView.setSize(BoxView.java:379)
         at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1618)
         at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:946)
         at javax.swing.text.DefaultCaret.setVisible(DefaultCaret.java:952)
         at org.seba.JTextPaneTest.testVisibility(JTextPaneTest.java:38)
         at org.seba.JTextPaneTest.test(JTextPaneTest.java:29)
         at org.seba.JTextPaneTest.main(JTextPaneTest.java:24)

    import javax.swing.JEditorPane;
    import javax.swing.JFrame;
    import javax.swing.JTextPane;
    public class JTextPaneTest {
         JFrame mainFrame;
         JEditorPane textPanel;
         public JTextPaneTest() {
              textPanel = new JTextPane();
            mainFrame = new JFrame("Test Frame.");
            mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            mainFrame.setSize(640, 480);
              mainFrame.getContentPane().add(textPanel);
              mainFrame.setVisible(true);
         public static void main(String[] args) {
              JTextPaneTest textPaneTest = new JTextPaneTest();
              textPaneTest.test();
         public void test() {
              for(int i = 0; i<100;  i++) {
                   testVisibility(false);
                   testVisibility(true);
         private void testVisibility(boolean b) {
              // This is were the exception will be thrown if the text panel is visible
              // when making these calls.
              textPanel.setEditable(b);
              textPanel.getCaret().setVisible(b);
    }I hope it's ok. You'll have to use Java 5 (1.5.0.11) to compile and run it.
    I run into the problem when I made the text pane not editable and the caret was still visible. I needed the caret to hide away too when making the text pane not editable. If I use the setEnabled(boolean) to disable the text pane, all the text is made grey.(I know that there are some methods to make this not happen). I just don't know why this simple test is not working as I would expect.

  • How to set visible property to href link

    Hi All,
    I want to open the new jsp page in the new tab when will we click on the link in my ADF application.So i tried like this.
    <af:column id="pt_c115" >
    <a id="JspLink" href="AuditLogInfo.jspx" target="_blank">JspLink</a>
    </af:column>
    Im able to view my new jsp page when im click on JspLink link.But here my problem is i have nee to set the visible condition if the 'status' field of adf table is succes only i want to view the link other wise no need to visible my link.
    visible="#{row.bindings.Status.inputValue=='SUCCESS'}" is working for commandbutton.But i'm not able to see any visible property in <a id="JspLink" href="AuditLogInfo.jspx" target="_blank">JspLink</a> .How can i set this condition?Please help me.I'm using JDeveloper 11.1.1.5 version.
    Thanks in Advance!
    Edited by: 851924 on Apr 5, 2012 11:22 PM
    Edited by: 851924 on Apr 5, 2012 11:23 PM

    Instead of using a jsplink you should use an af:goLink which is the adf equivalent and has all the needed properties.
    Timo

  • Set visible at Group Level

    Hi,
    I have 3 pages - Home, Air, Car
    My question is this : I am trying to set all 3 pages as available & visible for
    the Group so that every user added to this group will see these 3 pages and does
    not have to go to Portal Management to explicitly set these values. Is it possible?
    I see from the database, that there this table - PORTAL_PAGE_P13N has a row for
    the Group but no personalization info like it does for an user. Do you know how
    I can set these values (thro' JSP tags) for the Group instead of having to do
    for each user of the group.
    Any pointers appreciated!!
    Thanks,
    SLN

    you can accomplish this by creating a "group portal".
    1) create group "group1"
    2) create group portal (in portalapp tools) called "group1portal"
    3) put pages (and portlets) in group1portal
    4) assign new users to group1
    when they log in they will see the pages and portlets in this group portal with
    no manual intervention
    "SLN" <[email protected]> wrote:
    >
    Hi,
    I have 3 pages - Home, Air, Car
    My question is this : I am trying to set all 3 pages as available & visible
    for
    the Group so that every user added to this group will see these 3 pages
    and does
    not have to go to Portal Management to explicitly set these values. Is
    it possible?
    I see from the database, that there this table - PORTAL_PAGE_P13N has
    a row for
    the Group but no personalization info like it does for an user. Do you
    know how
    I can set these values (thro' JSP tags) for the Group instead of having
    to do
    for each user of the group.
    Any pointers appreciated!!
    Thanks,
    SLN

  • BE Address set visibility of distance in km field

    Hi all,
    I am trying to set the visibility of 'distance in km' field in the Edit screen for subtype 1(Permanent address) for Belgium.
    I created the context attribute of type wdvisibility and set the value to visible in the wddomodify of edit screen.
    Somehow only the label is getting visible not the input field.
    Please let me know what I am missing.
    Thanks
    Kukku.

    solved

  • Jtable - Set visible columns

    Hi,
    I'm trying to build an applet to edit mysql tables. I used a Jtable inside a JscrollPane but I would like to display only 3 or 4 columns at a time (I can have up to 40 !) and then let the user scrolls to the others with the horizontal scrollbar.
    My problem is that all the columns are always displayed (width reduced to fit) in the scrollpane. How can I reduce the number of visible columns ?
    Thanks,
    Olivier
    Edited by: user1721669 on 16 sept. 2012 11:06

    Random guess. Don't set any size (especially, preferredSize) on the JTable if it's within a JSCrollPane.
    For better help (anything less random), please post an SSCCE (http://sscce.org).
    Best regards,
    J.

  • HideEffect does not play when setting visible to false

    HY,
    If i set a fade effect on WindowedApplication on hideEffect when i put visible to false, the fade effect does not run anymore. I found this similar problem in the bug tracker: http://bugs.adobe.com/jira/browse/SDK-14615
    I use Flex builder 3 with the sdk 3.2.0, i don't understand why this bug is not resolved at this time.
    thanks for you help

    Hi,
    If you are in a country that permits redownloads, delete track and go to iTunes Store > purchased and redownload. http://support.apple.com/kb/HT2519
    Jim

  • Set visibility property for items depending on other items

    Hello,
    I want to set the visibility setting for an item that I have, the steps should be as the following,
    for example
    if I have an item that asked,
    do you have children ?
    if the answer is Yes,
    the next item should be visible which let's say, number of  them
    if no,
    the next item should be not visible
    I tried to set a trigger for the item I am controlling its visibility which is
    pre-text-item and wrote
    if 'CHEQUE_TABLE.CHEQUE_RECIEVED'='yes'
      then
      set_item_property(:SYSTEM.CURRENT_ITEM,visible,property_true) ;
    else
      set_item_property(:SYSTEM.CURRENT_ITEM,visible,property_false) ;
      end if;
    but it doesn't seem to be right, ,,,
    thank you

    I can see two potential problems.  The first:
    if 'CHEQUE_TABLE.CHEQUE_RECIEVED'='yes'
    Does CHEQUE_TABLE.CHEQUE_RECEIVED refer to a Data Block and Item?  If yes, then you are trying to tell Forms to look at the value of the string 'CHEQUE_TABLE.CHEQUE_RECEIVED' when you should be refering to the value of the Block.Item through direct reference, eg:
    IF :CHEQUE_TABLE.CHEQUE_RECEIVED = 'yes'
    How is the value of CHEQUE_RECIEVED set?  Does the user select the YES value from a List of Value (LOV) or from a Poplist or do they enter the value by typing it in?  If your code is looking at the string 'yes' and comparing it to the value of the Block Item which is in upper or mixed case, then 'yes' = 'Yes' or 'yes' = 'YES' will evaluate to FALSE instead of TRUE.
    It is always a good idea to use a Poplist or a List of Values when you are expecting specific values to be entered by the user; this enables you to force the value to be entered the same by everyone.  If the user CAN type the value in, then at least set the Case Restriction property to UPPER or LOWER so regardless of how the user enteres the value, it will be stored in the corrected case.
    Craig...

  • JLabel cannot be set visible at runtime

    I am using a button to open a JFileChooser and when a user selects a txt file all the data are read from it and shown into a text area. When this process is happenning I want to show a gif image showing the progress.The image is set into a label. The label is just made visible true. But when I try to do that the label is not shown. The code is below:
    function to open the JFileChooser
    fPath = odb.OpenDialogBox("d");after selecting the file the following code is written
    if (returnValue == JFileChooser.APPROVE_OPTION) {
    File selectedFile = fileChooser.getSelectedFile();
    parent.setLoadingVisible();parent is the object of the class from where OpenDialogBox function is called
    code in setLoadingVisible() as follows
    //ImageIcon icon = new ImageIcon(this.getClass().getResource("icon/loading.gif"));
            //jLabelImg.setIcon(icon);
            jLabelImg.setVisible(true);
            //jLabelImg.setVisible(true);
            //jLabelImg.updateUI();
            //SwingUtilities.updateComponentTreeUI(this);but it is not happening........................

    isocdev_mb wrote:
    And perhaps have a look at the demo app for [progress bars|http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html].
    ++++
    Yep

  • Set Visible AutoManagedAttribute with XML

    Hi all,
    I've set the Visible Automanaged Atribute of an Item by code, so the item is not visible in Add and Find modes.
    oForm.Items.Item("Refresh").SetAutoManagedAttribute(BoAutoManagedAttr.ama_Visible, 6, BoModeVisualBehavior.mvb_False)
    This works perfect!
    I then saved the XML form and removed the coding for the automanaged attribute (the line of code above), and now the Item's automanaged attribute doesn't work anymore.
                <item uid="Refresh" type="4" left="410" tab_order="0" width="120" top="355" height="19" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="0" right_just="0" description="" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1">
                  <AutoManagedAttribute>
                    <Attribute id="1" description="visible" modeAdd="0" modeFind="0"></Attribute>
                  </AutoManagedAttribute>
    If I follow the same procedure for the Editable attribute it works fine either by code or by XML.
    This behavior is constant is both B1 2007A PL44 and PL46.
    Does anyone have the same problem??
    Thanks in advanced,
    Regards,
    Vítor Vieira

    No input provided...

  • Setting visible to false in a multi-record block

    Is there a way to set the visible property of an item to false in a given row, but not for all instances of the item (based on another column in the row)?
    Yes, I know set_item_property does not work. I've tried set_item_instance_property to no avail, and have read that it does not support the "visible" attribute.

    Your findings are correct. You cannot set the visible property for one instance of an item. However, you can set the visual attribute. If you create a visual attribute with the same background and foreground, it will "hide" the data in the item instance.
    Hope this helps.

Maybe you are looking for

  • I have just updated to iTunes 11. Now ALL my downloaded music has gone, and only plays when I'm connected to the internet.

    NOT HAPPY.  I've Just upgraded to iTunes 11 on a MBP 15" 2009 model, OS 10.8.2 I use my computer all over the place with NO internet and cannot access the HUNDREDS of tracks I've purchased and downloaded and been playing for years. How can I access t

  • DVD Drive Won't Mount DVD+R Disks

    I tried to insert a DVD+R disk with photos on it but when it's inserted it's says that the "Disk inserted cannot be read by this computer." I then inserted several different DVD+Rs and nothing but it will read a CD+R so I am freaking out. I'm current

  • SMARTFORMS: 2 columns (each column consist 1 table) in 1 page

    Hi..., I've got problem that there is requirement to development smartforms as below format: Page 1 column "A"                column "B" No. Description     Qty Amt     | No. Description     Qty Amt 1. Desc1         1 100 |  5. Desc5               5

  • EJB lookup

    Hi i am using RSA for developing the code and i use the following code for looking up the ejb from the servelt deployed as part of the Same EAR file. Object objsessionBeanLookup = m_initialContext.lookup("java:comp/env/ejb/UpdateHistory"); UpdateHist

  • VISIO 2010 Default File Associations

    PROBLEM: Visio 2010 is not set as the default program for opening the .vsd file type.  I tried to set the default file associations to Visio 2010, but it doesn't show up in the list of default programs.  BACKGROUND: I am running Windows 7 Home Premiu