Setting the Horizontal gap

Hello Guys.
I am using java.awt .
I have a Jpanel and i am placing a button and a lable in it.
Now the thing is that i have to srt the horizontal gap between the button and lable with setHgap(), but i really do not know how to use it, i did try to get it from google, but no luck.
Pleae show me an example of it being used.
Any sort of help will be appreciated.
Regards
UnderDog

I am using java.awt .
I have a Jpanel and i am placing a button and a lable
in it.JPanel is from javax.swing, not from java.awt... :P
Now the thing is that i have to srt the horizontal
gap between the button and lable with setHgap(), but
i really do not know how to use it, i did try to get
it from google, but no luck.
Pleae show me an example of it being used.Setting the gap is depend on the Layout that you are using.
Example of using FlowLayout to set the HGap:
FlowLayout layout = new FlowLayout();
layout.setHgap(10);
JPanel panel = new JPanel(layout);

Similar Messages

  • Set the horizontal scroll bar for the OOTb document library view

    hi all,
     Am facing an issue in my sp portal.We have designed and developed the portal with OOTB document library views for site columns also. Going to enable the doc lib view. but  we have some  35 columns in eeacha nd every document
    library within our sub site. But if an end user wants to see the last column then he needs to scroll. but, since  then my master page has fixed width, the top corner will be seen as blank. would like to know how can we set horizontal scrolling
    in this doc lib view .
    Das

    Hi,
    According to your description, my understanding is that you want to set the horizontal scroll bar for the document library when the last column postion exceed the fixed width.
    I suggest you can try to use Jquery to set the width attribute of the menu bar dynamically if the document library width exceeded. You can add the Jquery or CSS style using SharePoint Designer under the PlaceHolderMain tag of document
    library page. Also, you need to find the div id in your environment using Internet Explorer.
    More information:
    http://sharepointpromag.com/sharepoint-development/sharepoint-branding-101-branding-master-pages
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Number: chart: set the horizontal axis (x-axis) crosses at

    When creating a chart in number, how can I set the horizontal axis (x-axis) crosses the y-axis at the point I want it to be? In other words, when I create a chart, the x-axis is automatically set to be at the bottom, but what if I don't want it always to be at the bottom?

    If you want the axis line somewhere else, you can draw a line on the chart using the graphics tools, having deselected the option for an automatic Axis line.
    Jerry

  • After upgrade to IOS6 I cannot set the horizontal hold

    I upgraded to IOS 6 and the symbal for horizontal/vertical hold has disappeared from the screen.  How can I set it?

    I went to the Application Support folder and there is no file named prefs.js there. The path ends with the Application Support folder. There is no Firefox folder in it.
    I have search all over my computer and there is no file prefs.js anywhere that I can find. I have removed Firefox and reinstalled a couple of ties with the same results.
    Eddie ryder

  • Deskjet F4480: what causes horizontal gaps when printing from the web?

    I just installed a Deskjet F4480 printer. I'm using Windows 7 64-bit.  Printing a word-processing document works just fine - no problems.  Printing from a web page, however, produces horizontal streaks or gaps in the print.  The bottom of some lines is clipped off.  How can I correct this?

    Hi Michael,
    Thanks for the suggestion, I tried USB, Ethernet and FAXing in a document.   All three print with the horizontal gaps.    The funny thing is that the copy (both color and blk/white) print out just fine.     I've run the available maintance functions serveral times, with no improvements.       I wound up purchasing another Canon Printer, because of being a need to print bind.   But would still like to get this one working, as I was very statisfied with it.
    Thanks, Roman...

  • 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.

  • Reading PDF in large screen mobile phone is often the horizontal screen reading,but the new adobe reader for Android mobile phone needs to be set to automatically turn screen, this is very inconvenient.

    Reading PDF in large screen mobile phone is often the horizontal screen reading,but the new adobe reader for Android mobile phone needs to be set to automatically turn screen, this is very inconvenient.I strongly suggest that the adobe reader Android version add manually rotating screen function, the best is the default horizontal screen reading.

    Reading PDF in large screen mobile phone is often the horizontal screen reading,but the new adobe reader for Android mobile phone needs to be set to automatically turn screen, this is very inconvenient.I strongly suggest that the adobe reader Android version add manually rotating screen function, the best is the default horizontal screen reading.

  • How can i set the orientation for a photo book (horizontal or vertical)

    how can i set the orientation for a photo book (horizontal or vertical)
    I like a photo book vertical format and i cant findet!!

    That was quick! Although my earlier search turned up nothing, when I posted my question the system immediately gave me a list of previous questions among which I found the following answer:
    This solved my question by LarryHN on Aug 18, 2010 6:01 PM
    select the photos and change the date/time - photo menu ==> adjust time and date to make a relative adjustment to a number of photos ==> batch change ==> time and date to set an absolute time date for them
    LN

  • Can I left the password gap blank in setting up steps?

    I've reinstalled OS X but I always stuck on the step "create your computer account". I don't want to set the account password on this Mac. Can I left the password gap blank and go to next step?

    This may work differently for a MacBook ..... you could try and search: http://support.apple.com to find what you are looking for.
    Sorry I can't be of more help.

  • Horizontal 'gap' between two level tabs SOLVED

    I’ve got a stange problem:
    I’ve got several pages and a two level tabs. Everything worked before a collegue of mine switched the theme into a self created one. Now the design of the two level tabs depends on what page you are on. Sometimes there is a ‘gap’ between the parent tabs and the horizontal bar and the tabs below that bar.
    On some pages this gap is small and it looks like it should:
    http://img90.imageshack.us/my.php?image=tabs01lq6.jpg
    But sometimes there is a lot of space above and below that bar:
    http://img91.imageshack.us/my.php?image=tabs02fa9.jpg
    Can anyone help me? Please!!!

    Hi Carl,
    thanks for your answer!
    I also thougt it coud be an issue with the CSS and I've searched the whole CSS-Stylesheet. In the part of the Tab Classes I searched for every margin-top and margin-bottom and set it to 0px but it had no effect.
    Here you can see the part of my CSS-Stylesheet containing the attributes of the tabs:
    /* Tab Classes */
    /* .t4Tabs{text-align:center;padding:10px 0 2px 0;} */
    .t4Tabs{text-align:right;padding:10px 0 2px 0;margin-bottom:0px;margin-top:0px;}
    .t4standardtabcurrent{vertical-align:middle;padding:2px 5px 2px 5px;margin 0px 3px 0px 3px;background-color:#CCCCCC;color:#111111;border:2px solid #111111;border-bottom:0;text-decoration:none;font-weight:bold;}
    .t4standardtab{vertical-align:middle;padding:2px 5px 2px 5px;background-color:#777777;color:#ffffff;margin:0px 3px 0px 3px;border:2px solid #111111;border-bottom:0;text-decoration:none;font-weight:bold;}
    .t4standardtab:hover{background-color:#CCCCCC;color:#000000;text-decoration:none;}
    .t4ChildTabs{text-align:center;background-color:#FFFFFF;padding-bottom:4px;margin-top:0px;margin-bottom:0px;}
    .t4childtabcurrent{margin-left:3px;margin-right:3px;font-weight:bold;background-color:#DDDDDD;padding:2px;border:2px solid #000000;border-top:none;text-decoration:none;}
    .t4childtab{margin-left:3px;margin-right:3px;padding:2px;border:2px solid #000000;border-top:none;text-decoration:none;font-weight:bold;}
    But the strange is that this horizontal space is not equal on every page. On some pages it is quite small and like I want it to be and when I select the tab "Reports" for example there is a huge gap.
    When I change the margin in the CSS-Stylesheet shouldn't it be for all pages? Shouldn't the margin be the same whatever page I am on?
    Greetings,
    Sofie

  • Yet another question about setting the size of a JTextField

    Hello,
    yep, I already looked at the other posts & the API.
    I have tried the following (& other code) to try to set the width of the display. Nothing works so far.
            percent_CO2 = new JTextField();  
            percent_CO2.setColumns(8);
            percent_CO2.setToolTipText("The % Carbon Dioxide relates to ...");
            percent_CO2.setPreferredSize(new Dimension(10,20));
            percent_CO2.setMaximumSize  (new Dimension(10,20));        This is one of several JTextField's on a Jpanel defined as :
    jcommonCharPanel.setLayout( new GridLayout(8, 2, 2, 4) );
    //8 rows, 2 columns, vertical & horizontal gaps of 2 & 4Any ideas why it is so difficult to set the size of the JTextField?
    Should I try to limit the size of the JPanel instead?
    thanks,
    -- HSC --

    http://forum.java.sun.com/thread.jsp?forum=54&thread=379656

  • The Horizontal & vertical scroll is not visible or not working when i run the form in Forms 6i.

    Hi all,
    The Horizontal & vertical scroll is not visible or not working when i run the form.
    In this form , there are 5 canvas namely
    CANVAS2 - Stacked Canvas
    PASS - Content Canvas
    MAT_RATES - Content Canvas
    DATE - Content Canvas
    PREVIOUS - Content Canvas
    I have set "Show Horizontal Scroll Bar" to "Yes" and  "Show Vertical Scroll Bar" to "Yes" in the WINDOW Property.
    I have  set "Show Horizontal Scroll Bar" to "Yes" and  "Show Vertical Scroll Bar" to "Yes" in the STACKED CANVAS Property .
    But still the Horizontal and Vertical Scroll Bar is not working when i run the Form.
    Help me with this please. How do i make it visible??
    Oracle Forms 6i..
    Thank You.

    Vijetha wrote:
    Hi all,
    The Horizontal & vertical scroll is not visible or not working when i run the form.
    I have set "Show Horizontal Scroll Bar" to "Yes" and  "Show Vertical Scroll Bar" to "Yes" in the WINDOW Property.
    I have  set "Show Horizontal Scroll Bar" to "Yes" and  "Show Vertical Scroll Bar" to "Yes" in the STACKED CANVAS Property .
    But still the Horizontal and Vertical Scroll Bar is not working when i run the Form.
    Help me with this please. How do i make it visible??
    Oracle Forms 6i..
    Thank You.
    hello vijetha,
    window and canvas show scroll bar when it need.
    You should show block property
    and set block scroll bar
    hope this helps..
    Hamid

  • How can I set the default line height?

    Greetings,
    I have a report that displays observed behavior in a list format like the one below:
    Behavior Observed:   
        Withdrawn           
        Happy
        Sad
        angry
    There are 5 responses as to the severity of the behavior or it is left blank if the behavior was within normal limits.
    So the output would look like this:  
    Behavior Observed:   
        Withdrawn            (mild)
        Happy
        Sad                      (moderate)
        angry
    The problem is that when this report was designed the details sections were not uniformy formatted and the spacing between data elements is hard to follow from the label to the data field.  I tried to set the details to be uniform by selecting "Arrange Lines",  however when I do this, the data is displayed too close horizontally.  So my question is how do I set the default line height for each field so that they are uniform in distance from each other but not too close due to the font height?
    Does this make sense?
    Thank you,
    Kevin

    I'm confused... How are you associating line height with horizontal field spacing???
    If you have this...
    Behavior Observed:     Severity:
    Withdrawn          (mild)
    Happy
    Sad               (moderate)
    angry
    But want it to look like this...
    Behavior Observed:
    Withdrawn (mild)
    Happy
    Sad (moderate)
    angry
    all you have to do is create a concatenation formula. Something like this...
    {TableName.BehaviorObserved} & " (" & {TableName.Severity} &")"
    Sorry if I've misunderstood what you are trying to do.
    Jason

  • I want the minimum of the horizontal axis to be the first day of the month.

    I have a situation where I want the minimum of the horizontal
    axis(with date time axis) to be the first day of the month. I
    attempt it like so:
    var max:Date = new Date();//current date is our max from
    which we will calculate the min
    var min:Date = new Date(max.fullYear,max.month,1);
    dateTimeAxis.minimum = min;
    However this first date on this axis is the last day of the
    previous month for example 31 August instead of 1 September. Any
    ideas how to fix?

    Nikos, the only thing I can think of (off hand) is that it's
    defaulting to "zero" hour on that date, if you tried:
    var min:Date = new Date(max.fullYear,max.month,1,13);
    Would that make it work? That would set the date to 1pm.
    Have you considered defining the axis with the data you are
    binding to?
    Cheers,
    David

  • Hi, I am using Indesign CS6, How to set the page size in Inches.

    Hi, I am using Indesign CS6, How to set the page size in Inches.

    All fields in InDesign can be entered in any measurement system. So, if you want to make an 8"x10" document and go to File>New Document and the window looks like this:
    …you can type either 8 in or 8" into the Width field like this:
    …and when you move to the next field, it will convert the eight inches into the equivalent number in the unit of measure that it is using at the moment, like this:
    … (203.2 milimeters is the same as 8 inches). You can also enter a different measurement unit into other fields once the file is created, such as the width or height of a frame, or the position of an object in the X and Y coordinates.
    If you would rather just work in inches instead of having to type the inches mark or abbreviation, go to InDesign>Preferences>General and select the Units & Increments tab. There you will see Ruler Units for Horizontal and Vertical at the top of the window. Set them to Inches and all of the fields will display in inches. If you do that to an open document, you will change the unit of measure for that document. If you do it while no documents are open, it will change the unit of measure for any new documents you create. To change the unit of measure for existing documents, you will have to open each and make the change.

Maybe you are looking for

  • For a PR, check the material master

    Hi, I have a basic question. I have a requirement to check the material master to determine the existence of the material master after a PR is created. Can we create a PR without a material. What are the methods of creating PR apart from manual creat

  • New to Graphics in ABAP

    Hi all!! I have a requirement to create a program that shows a graphic chart, but must show 2 graphic on the same chart, that is a bar graph and a line graph on the same chart. This is to compare actual data with data from previous years, so it must

  • How to check if my SuperDuper backup works?

    After reading that not all external HDDs guarantee the necessary compatibility with SL in case of total system recovery from an external backup, I would like to test mine. Is there a procedure around that explains how to do this check without putting

  • Multiple SSID network; 1 Extreme (current gen) + 3 Express (2011 models)

    Hi, I'm looking to set up an Wireless network using Multiple SSID's (Business and Guest) using one airport extreme and three Airport Expresses. Are the Airport Expresses capable of bridging multiple ssids or extending multiple ssids? What's the best

  • Cisco WRV210 unable to reset

    I have a Cisco WRV210 wireless router that wont boot correctly after enabling WMM, problem is that after I enabled WMM and router rebooted I only see the power led and DMZ led on but not the wireless led and Internet led. I tried using the reset swit