Setting the co-ordinates of a J componant?

Is there any way to set the co-ordinates of a J componant?
Such as place a button in the centre of a J Menu or place one at any place in there; What i need it for;
Im making a helper for my 2d mmorpg, its for mappers, so they can enter different information and it auto-matically saves as a data file and adds to the map.
So, there is a JMenu with about 5 different JTextField's going down, but i need to know how to place them, not just place them at the top on a Menubar etc...
Thanks

so its not possible without netbeans? because it always saves as 0bytes when i try using that.

Similar Messages

  • How i can set the selected item of a dropDown component from java code

    Hi
    Thank you for reading my post
    How i can set the slected item of a DropDown component from backing beans java code ?
    it is binded with a database , so one field determine its display and one other field determine its value , I want to set the selected item of this combobox
    In back code i have both value and display values to use them .
    can some one give me some help ?
    Thanks ,

    See code sample 3 at http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    See also, the selection components row in the table under http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    It says
    One way to preselect items is to call setSelectedValue(Object[]) or setSelectedValue(Object) from the prerender() method. You pass in the return values of the items that you want preselected. Be sure to verify that getSelected() returns null before setting the default options, or you will overwrite the user's selections on a post-back.

  • [svn:fx-trunk] 8024: Fixed an injection where setting the 'content' property of Spark text component to a TextFlow would cause you to get a TextFlow nested inside a TextFlow .

    Revision: 8024
    Author:   [email protected]
    Date:     2009-06-19 16:59:25 -0700 (Fri, 19 Jun 2009)
    Log Message:
    Fixed an injection where setting the 'content' property of Spark text component to a TextFlow would cause you to get a TextFlow nested inside a TextFlow.
    QE Notes: None
    Doc Notes: None
    Bugs: SDK-21906
    Reviewer: Carol to review
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21906
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as
        flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as

    Well, I've already solved one of the two issues
    In order to display the icons on my buttonbar buttons, I just needed to point at {hostComponent.data.data} instead of {hostComponent.data}. I'm not sure why, but {hostComponent.data} in my skin class is a handle on my instance of ButtonBarButton, not its "data" property. Any explanation is welcomed
    I still have got the first issue though. Oddly enough my design works if I put an mx Image instead of the spark BitmapImage for the client logo. That will do the trick for the moment but I'd prefer to deliver a 100% pure spark component in my prototype, and I can see no reason why BitmapImage works inside my ButtonBarButtons and doesn't otherwise...

  • How to set the value of something in a component from the main application?

    Hi,
    Maybe I've been working on this too long, but I can't figure
    out how to set the value of the text property of a text input field
    in a component from my main application in an mx:Script block. I
    have a component called Login in the components folder, and I need
    to set the text value of empNum. In my mxml declaration at that the
    top, I've declared these components as xmlns:c="components.*" So
    logically, the property I'm trying to set is c.Login.empNum.text. I
    can't figure out the correct syntax to get this to work, and I've
    tried everything I can think of. Does anyone have any suggestions?
    I'm thinking this should be an easy one, and I'm just missing
    something.
    Thanks!
    Holli

    Did you try giving it an id ?
    <c:MyLogin id="loginScreen" /c>
    So later you can do loginScreen .empNum.text = "my text"
    Laurent,

  • How to set the destination URL of a HtmlCommandLink component

    How can I please set by code the URL which will be opened when I click on an HtmlCommandLink or HtmlOutputLink .
    I couldn't find the associated method.
    Thanks in advance.

    Thanks for your reply .But I didn't foud the method allowing to set the url attribute to the component.
    But now my problem is resolved.I used the com.sun.webui.jsf.component.Hyperlink component.And it has method named setUrl making what I want.
    Thanks.

  • How to set the maximum length in a JTextField component.

    Hi This is a basic doubt. How can i set the maximum lenght in a JTextField.. I tried the setColumns() method. It doesnt do anything.. Pls Help.
    Thanks
    Rajeev

    Here's an example using PlainDocument.
    textField.setDocuemnt( new TextFieldVerifier() );
    class TextFieldVerifier extends PlainDocument {
    int requiredLength = 10; // whatever length you want
    public void insertString( int offset, String str, AttributeSet attSet ) throws BadLocationException {           
    boolean valid = true;          
    if (str == null) {
    return;
    String old = getText( 0, getLength() );
    /* insert the new string at the given offset, into the old string */     
    String newStr = old.substring( 0, offset ) + str + old.substring( offset );
    if (newStr.length() > requiredLength)
    valid = false;
    Toolkit.getDefaultToolkit().beep();
    if ( valid )
    super.insertString( offset, str, attSet );
    }

  • Error setting the selected item in a dropdown component in a BPM

    Hi,
    The first step in the process is a human step where it's possible to select country in a dropdown box. The second step is also a human step where I try to display the same context that was selected in the first step.
    I use the "merge" operation in the mapping, but the item that I select in the first step in the process is not selected in the second step in the process.
    Does anyone know how to solve this?
    Best Regards
    Michael

    Hi Michael,
    Only simlple types are supported in WD for EHP1 (Binary, boolean, byte, date, decimal, double, float, integer, long, short, string, time, timestamp)
    No further Dictionary Types supported
    (for example: currency)
    Best Regards,
    Karthik
    Edited by: Karthik S J on Oct 15, 2008 2:34 PM

  • How do you set the fontSize of a label in AS?

    I am tinkering with a neat little component I found, and I
    added a few labels to it. In the AS code there are now four labels.
    I wanted to change the default font size on one of the labels,
    which I know how to do in mxml but I don't really understand how
    that translates to a component in ActionScript.
    Imitating the way height and width were set, I tried:
    label.fontSize="10";
    but this gives me an error 1119 "access to possibly undefined
    property fontSize through a reference with static type
    mx:controls.label"
    Can someone tell me how to set the font size within an AS
    component?
    M.

    quote:
    Originally posted by:
    Greg Lafrance
    Actually you may need to do this, but don't name your objects
    "label" otherwise you will have a conflict with Flex property
    names.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    private function clickHandler():void{
    lbl.setStyle("fontSize", 30);
    ]]>
    </mx:Script>
    <mx:Label text="One"/>
    <mx:Label text="Two"/>
    <mx:Label text="Three"/>
    <mx:Label id="lbl" text="Four"/>
    <mx:Button label="Test" id="btn"
    click="clickHandler()"/>
    </mx:Application>
    This is mxml though right? How could you translate this into
    AS? This thing is an AS component.
    By the way I'm not using the name label I just changed to
    that to make the code generic / easier to understand. The label
    names are minLabel, maxLabel, and topLabel
    M.

  • Problem in setting the background color of jtable with Nimbus

    Hi
    I have created a java swing application. In which I am using JTable.
    When creating a simple JTable and displaying with Nimbus, the row background color alternates between white and a light blue-grey.
    I want the table with single colour. Only the first column should be grey colour and other should be white.
    I used this code to set the background and foreground colour.
    public Component prepareRenderer
        (TableCellRenderer renderer, int index_row, int index_col){      
                Component objComponent = super.prepareRenderer(renderer, index_row, index_col);         
                Color objGreyColour = new Color(240,240,240);
                Color objWhiteColour = new Color(255,255,255);
                if(index_col == 0){
                    objComponent.setBackground(objGreyColour);
                    objComponent.setFont(new java.awt.Font(CommonClass.getFontName(),java.awt.Font.BOLD, CommonClass.getFontSize()));
                    objComponent.setForeground(Color.BLACK);
                }else{               
                    setSelectionBackground(Color.BLUE);
                    objComponent.setBackground(objWhiteColour);
                    objComponent.setForeground(Color.BLACK);
                return objComponent;
            } Look wise it is fine but when i try to select the cell it is not highlighting the cell and also i m not able to select multiple cell with ctrl key.
    Any help would be appreciated
    Thanks
    Sonal

    Hello,
    1) if you want better help soone,r please post an SSCCE (http://sscce.org) instead of a code extract.
    2) selection highlighting is lost because your code... doesn't handle selection. To take selection into account, you can use <tt>if (super.isRowselected(index_row)) {...}</TT>.
    Regards,
    J.

  • Can we Set the Default SAP Component while Creating Support Message

    Hi Friends,
        I Have got requirement like, when we create the support desk message from any application system by default the sap component should get selected which we have determined in Solman.Our Business secnario is too complex user give create the support message without giving the Sap Component or they give wrong sap Component, so we want to set the sap component get selected by default while creating the support desk message, guide me in solving this issue.
      Regards
        Charan

    I think your logic is reversed.  I think it's better to let users create messages from the application areas from which they are having the problem.  Based on the standard SAP component which defaults into the component field, the ticket can be routed to one of your 20 teams.  This is where the agent detemination rule for support team can be configured.  There are a number of message on the forum regarding support team configuration.  This way, if your 20 teams can't solve the problem (for example SAP defect) then the message can be forwarded directly to SAP using the correct component.  Good luck.

  • ADF - Component File Download Listener - Setting the output filename

    Studio Edition Version 11.1.1.2.0
    Hi, I would like to learn how to set the output filename as current data + filename. I have a button with the component File Download Listener that has theses parameters
    Content/Type: application/pdf
    Filename: test.pdf
    Method: fullReportPDF()
    I needed that when the user clicks the button, that he return the current date + filename statically defined.
    How i may to make this?

    In a bean you implement a method which return the filen ame date and static part concatenated and set it as EL into the af:fileDownloadActionListener
    // on the page
    <af:fileDownloadActionListener contentType="application/pdf"
                                             filename="#{XYZBean.filename}"
                                             method="#{XYZBean.fullReportPDF}"/>
    // in the bean
        public String getFilename()
            String fn = (new Date()).toString() + "static_part.xyz";
            return fn;
        public void fullReportPDF(FacesContext facesContext, OutputStream outputStream) { ... }where XYZBean is the bean where you have implmented the method fullReportPDF.
    Timo

  • How do you set the text of a Hyperlink component in code

    I am using Visual Web pack in NB 6.0. How do you set the text of a hyperlink component in code?
    Please see screenshots at
    http://coba.usf.edu/departments/isds/faculty/agrawal/projects/java/
    I have a hyperlink in a grid panel. I am using
    hyperlink1.setText("Hello"); in prerender(),
    but the Hyperlink shows up with the text "Hyperlink", whereas I was expecting "Hello". However,
    hyperlink1.setUrl("http://www.usf.edu"); works as expected.
    I tried nesting a static text in the hyperlink as suggested in the Creator guide (ed 2, Google project). I deleted the "Hyperlink" text in the properties editor but then the page turned out blank.
    Thanks
    Manish

    Hi Manish,
    Great to know you were able to fix your issue. The following blog entry has the list of resources you would like to look at for future.
    http://blogs.sun.com/NetBeansSupport/entry/useful_resources_for_visual_web
    Thanks
    K

  • How to set the extra component to horizontal scrollbar position

    How to set the component to position of horizontal scrollbar , that position contain two component horizontal scrollbar and any component (JButton , JLabel ) like that.. Ms-Word scrollbar ,
    Like that bellow fig.
    <!--[if !mso]>
    <style>
    v\:* {behavior:url(#default#VML);}
    o\:* {behavior:url(#default#VML);}
    w\:* {behavior:url(#default#VML);}
    .shape {behavior:url(#default#VML);}
    </style>
    <![endif]--><!--[if gte mso 9]><xml>
    <w:WordDocument>
    <w:View>Normal</w:View>
    <w:Zoom>0</w:Zoom>
    <w:PunctuationKerning/>
    <w:ValidateAgainstSchemas/>
    <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
    <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
    <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
    <w:Compatibility>
    <w:BreakWrappedTables/>
    <w:SnapToGridInCell/>
    <w:WrapTextWithPunct/>
    <w:UseAsianBreakRules/>
    <w:DontGrowAutofit/>
    </w:Compatibility>
    <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
    </w:WordDocument>
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
    </w:LatentStyles>
    </xml><![endif]-->
    <!--
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    {mso-style-parent:"";
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman";
    mso-fareast-font-family:"Times New Roman";}
    @page Section1
    {size:8.5in 11.0in;
    margin:1.0in 1.25in 1.0in 1.25in;
    mso-header-margin:.5in;
    mso-footer-margin:.5in;
    mso-paper-source:0;}
    div.Section1
    {page:Section1;}
    -->
    <!--[if gte mso 10]>
    <style>
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman";
    mso-ansi-language:#0400;
    mso-fareast-language:#0400;
    mso-bidi-language:#0400;}
    </style>
    <![endif]-->{font:'Times New Roman'}{size:12pt}<!--[if gte vml 1]><v:shapetype id="_x0000_t75"
    coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"
    filled="f" stroked="f">
    <v:stroke joinstyle="miter"/>
    <v:formulas>
    <v:f eqn="if lineDrawn pixelLineWidth 0"/>
    <v:f eqn="sum @0 1 0"/>
    <v:f eqn="sum 0 0 @1"/>
    <v:f eqn="prod @2 1 2"/>
    <v:f eqn="prod @3 21600 pixelWidth"/>
    <v:f eqn="prod @3 21600 pixelHeight"/>
    <v:f eqn="sum @0 0 1"/>
    <v:f eqn="prod @6 1 2"/>
    <v:f eqn="prod @7 21600 pixelWidth"/>
    <v:f eqn="sum @8 21600 0"/>
    <v:f eqn="prod @7 21600 pixelHeight"/>
    <v:f eqn="sum @10 21600 0"/>
    </v:formulas>
    <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
    <o:lock v:ext="edit" aspectratio="t"/>
    </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:453pt;
    height:26.25pt'>
    <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\04\clip_image001.png"
    o:title=""/>
    </v:shape><![endif]--><!--[if !vml]--><img src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/04/clip_image002.jpg" alt="" width="485" height="27" /><!--[endif]-->{size}{font}
    How to design ?

    pradeep.rajadurai wrote:
    I want set the JTable as a background of jframe or jinternalframe , how it is possible One way that may work, you can always extract the image from a rendered JTable and then paint the same image into the JPanel that holds your components via it's paintComponent method, then added the JPanel to the app's contentPane.
    give me simple pgmIs English your second language? Because if so, please understand that this demand can be taken by some as rude.

  • How to set the width for a selectManyShuttle component

    Hi,
    I'm using selectManyShuttle component from Oracle ADF Core and some of the items in the showing list are long, therefore the width of selectManyShuttle expands the page. How to set the width property for selectManyShuttle component? After that does selectManyShuttle provide horizontal scrollbar as well?
    Thanks in advance,
    lapi
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]

    Solution here:
    Re: ADF Faces Scrollable Panel or Scroll Bar inside a component
    Regards
    Grant

  • Set the minimal size of a Component with BorderLayout

    Hi,
    I got a little problem using BorderLayout.
    The scenario is :
    A JPanel placed BorderLayout.WEST got a size a few pixel too small for a JTable contained in this panel to paint all names of the table header.
    If i set the preferredScrollableViewportSize larger then a specific amount the table disappear(shrinks to a tiny size)
    The panel uses GridBagLayout...
    How can i set the size of this "west"-component of the border layout a little larger?
    regards
    Olek

    My understanding of help is an other then only post messages likeWell, your understanding, in my opinion is wrong.
    You must post a self documenting program ...Not everybody who uses this forum speaks english as their main language. Even if english is your main language it is not always easy to communicate the problem effectively. By posting demo code we can see exactly what you are doing.
    Or why you don't read the API... Of course that is a valid answer. You should always read the API. Why should we waste time typing the Documentation from the API when we can point you directly to the API????????
    why you don't search the forum Again, why should be waste time answering questions that have already been answered???????
    You learn by searching the forum and finding multiple solutions, then you use the solution that is appropriate. There is rarely a single solution for all cases. The more knowledge you have the better decision you can make.
    Have a little pride and learn to do some problem solving on your own without us spoonfeeding every anser to you.
    It is not possible to post a short self documenting program ...Then you truly don't understand what the problem is. And if you don't understand what the problem is how to you expect to communicate that problem verbally so that we understand the problem. You question is not about logic its about sizing of components. How hard is it to create a component and add it to a panel to demonstrate the problem. You don't even need real data. For example you can create a JTable with a single line of code, JTable table = new JTable(5, 10).
    the core of the problem depends on the components added to the JSplitPane...Then demonstrate that with a SSCCE.

Maybe you are looking for

  • Error on Goods Receipt

    Hi, please help. I'm getting the following error while doing goods receipt using BAPI. BAPI: BAPI_GOODSMVT_CREATE Error: "Material document data and PO data do not match". Please help. Regards.

  • Soft pegging in Oracle MRP 12.0.6

      We are using Oracle MRP 12.0.6 and we run MDS MPS and then MRP. Material planner generates purchase requisition against planned orders. Planner does not use MRP workbench to generate PR but through ERP reports having pegging information he generate

  • Does Screen Resolution Cause Display Problems?

    I just picked up my new 15 inch Retina Macbook Pro with 750m and I changed the screen resolution to the second option,the one with the bigger text but i am noticing that when i close a window, a white horizontal line comes up around where the window

  • Date & time problems after new year

    Hi, First of all, HAPPY NEW YEAR! After the new year my date and time is always changing to a date in the year 1969. I do reset it whenever I turn my pb on. But it always goes back when I turn it off. What could be the reason?

  • Can't figure out why its not saving to localdb

    I'm using EF 6.0, with a localdb I created. The program executes fine and iterates over what I want, but it does not save to the database at all.I'm using Json.Net library if it makes a difference. Any ideas or tips would be appreciated (self-taught