JComboBox scrolls its text to the right

Hi,
I have a JComboBox with a limited size, say 5 characters. However, some of the selectable items have more than 5 characters. For example, take "01234abcde".
If a user selects this item, I would like to see "01234" and the remaining text hidden. However, the combo box scrolls the text to the left and displays "abcde". Any ideas, how I change this behaviout?
Regards,
Jochen

Well,
Would this help ?
class MyRenderer extends JLabel implements ListCellRenderer  {
  public MyRenderer() {
    //do what's needed here
  public Component getListCellRendererComponent(JList list,
                                                                                                 Object value,
                                                                                                  int index,
                                                                                                  boolean isSelected,
                                                                                                  boolean cellHasFocus)  {
    super.setText(value.toString());
    super.setHoizontalAlignment(SwingConstants.RIGHT);
    //plus other things that might be needed
    return this;
}and somewhere else
myComboBox setRenderer(new MyRenderer());regards,

Similar Messages

  • When i take a picture from left its turning to the right and the other way. Howcan i stop that?

    When i take a picture from left its turning to the right and the other way. Howcan i stop that?

    Hi Cecilie1,
    I apologize, I'm a bit unclear on the exact nature of the issue you are describing. If you are having issues with photo rotation, you may want to make sure that your iPhone is detecting the orientation when you take the photos. In iOS 7 and iOS 8, the top menu text when taking a photo should rotate to show orientation (the bottom menu stays oriented to the shutter button). You can see these menus on the following page:
    Camera at a glance - iPhone
    If your iPhone isn't sensing rotation for pictures, you may want to check to see if the Rotation Lock is engaged, as noted here:
    If the screen doesn't rotate on your iPhone, iPad, or iPod touch - Apple Support
    Regards,
    - Brenden

  • I'm using Acrobat Pro 11. When printing an email to PDF most of the time it cuts off the text on the right margin. Setting look OK and I've moved things around on the email, but that doesn't seem to make any difference. Is there an Adobe setting I'm missi

    Like I said above, print to Adobe pdf and it wants to cut off the text on the right margin. I can't see to find a setting that changes this. Any ideas??

    OK, so I have now found that this is apparently normal for iTunes, to only accept mpeg 4 movie files, all the searching I did before I must have worded it wrong because I couldn't find anything about this, incredibly. Had been looking for why iTunes won't take all the files it previously did, like if it had been changed, and it hasn't, it's allegedly always taken only mpeg 4 files. Also I had been searching for why iTunes crashes every time I try and add/import anything but mpeg 4 files, and even sometimes with mpeg 4 files. That isn't normal, it's supposed to just do nothing apparently as I've just found out. So for these reasons I didn't find the answer despite my searching all over the web.
    So I guess that answers my own question now, but I'm still perplexed as to why I absolutely, definitely, without any doubt, had several hundred movies of a few different video file types loaded, accessible and playable in my iTunes library that everything here claims iTunes never accepted. It apparently shouldn't have been possible for me to have done this, but for probably 10 years it's been this way.
    Perhaps since I don't remember adding these files to iTunes anymore recently than maybe 6 or 7 years ago, the iTunes back then did accept all kinds of file types? Or could I have somehow had some video codecs or software that expanded the capability of my movie players like Quicktime Player that unwittingly also allowed iTunes to take those files as well? All I know is somehow it worked! So now my question is how did I have it working before, so that maybe I can make it work again.

  • To display a text on the right hand corner of an ALV list in SAP

    Hi All,
    I need to display a text on the right most corner of the ALV list output where there are some details present at the top of the list.
    I tried using the statement  
    CONCATENATE space space space space space space space space space space
                  space space space space space space space space space space 'required text" INTO ls_line-info.
    This ls_line is of type slis_listheader. But this statement did not work.
    Can anyone please help me how do i display this "required text" at the right most corner above the ALV list?
    Thanks.
    Taarikha

    Hi,
    You will have to use I_CALLBACK_HTML_TOP_OF_PAGE instead of I_CALLBACK_TOP_OF_PAGE.
    See the below sample code.
    FORM html_top_of_page USING lw_document TYPE REF TO cl_dd_document .
      DATA : doctable TYPE REF TO cl_dd_table_element,
      col1_t1 TYPE REF TO cl_dd_area,
      col2_t1 TYPE REF TO cl_dd_area,
      col1_t2 TYPE REF TO cl_dd_area,
      col2_t2 TYPE REF TO cl_dd_area.
    * add quick table with five columns
      CALL METHOD lw_document->add_table
      EXPORTING
      no_of_columns = 2
      border = '0'
    * cell_background_transparent = ' '
      width = '100%'
      IMPORTING
      table = doctable.
    * Filling columns in row
      CALL METHOD doctable->add_column
        EXPORTING
          width  = '40%'
        IMPORTING
          column = col1_t1.
    * Filling columns in row
      CALL METHOD doctable->add_column
        EXPORTING
          width  = '60%'
        IMPORTING
          column = col2_t1.
      CALL METHOD doctable->new_row.
      CALL METHOD doctable->add_column
        EXPORTING
          width  = '40%'
        IMPORTING
          column = col1_t2.
    * Filling columns in row
      CALL METHOD doctable->add_column
        EXPORTING
          width  = '60%'
        IMPORTING
          column = col2_t2.
    *Now adding the texts
      DATA lw_text1 TYPE sdydo_text_element VALUE 'Danish'.
    *lw_text1 = 'your first text'.
      CALL METHOD col1_t1->add_text
        EXPORTING
          text = lw_text1.
        CALL METHOD col2_t1->add_text
        EXPORTING
          text = lw_text1.
    *Similarly add text for other columns
    *Adujust % in width to adjust the column as required
    ENDFORM.                    "html_top_of_page
    Regards,
    Danish.

  • Text to the right is cut off on print/preview of web pages

    To the WebMaster's of oracle.com
    I' still like to print out information from your web site about hot topics (like your recent articles about BPEL), so a long flight will get more interesting..
    However the text to the right is cut off when printing (using IE6 on WinXP). It seems that the formatting requires a minimum width.
    I would also prefer to see the "print view" link at the top of an article and not at the bottom.
    With best regards from Germany,
    Stefan

    Stefan....this problem sometimes occurs with articles containing wide code samples. Can you please provide the specific problem URLs?
    We are aware that the "Print View" functionality is less visible than it could be; unfortunately, moving it to the top of the page isn't as straightforward as it seems. We're working on it.
    Cheers, OTN
    This problem should now be fixed in the three BPEL Cookbook installments.
    Message was edited by:
    jkestely

  • I purchased Microsoft Office for Mac through the Apple website.. I have downloaded all from the disk into my Mac, no problem with all the other Word etc, but Outlook is asking for the key number: I have put it in but its obviously not the right one...????

    I purchased Microsoft Office for Mac through the Apple website.. I have downloaded all from the disk into my Mac, no problem with all the other Word etc, but Outlook is asking for the key number: I have put it in but its obviously not the right one...???? In the box with the disk came the product key, have put it in and it doesnt work. Please help..x

    unfortunately - you can not.  you can't even buy outlook by itself at microsoft's own website.
    does it have to be outlook?  maybe you can get away with using something else that's outlook compatible.
    how about trying Thunderbird for Mac OS?
    or maybe you can call apple and let them know you purchase the wrong version - they might give you a break and just pay the difference for the home and business version.
    good luck

  • Newbie question - Parallax scrolling a logo to the right

    Hi there,
    I am trying to design my new site using Muse.
    I would like my logo to appear center, top of browser but as the user scrolls down the page I would like the logo to move out of the way to the top right of the browser.
    What I have done is create a retangle the size of the logo and placed center but the scrolling happens within the retangle.
    Can someone direct me on how to do this?
    Thanks in advance.

    It seems you have been playing around with the Scroll Effects available for the Fill option.
    Try using the Scroll Effects panel on the right to work with the object instead. You may need to disable the Fill scroll effects first.
    Refer: http://helpx.adobe.com/muse/tutorials/scroll-effects.html#Using%20the%20Scroll%20Effects%2 0panel%20to%20apply%20scroll%20effects%20to%20page%20element
    Cheers,
    Vikas

  • Float is not working? I need the text to the right of the image but my CSS isn't working. Help pls

    Hi,
    I am having some unusual difficulty getting my images to float left/right in order to have the text beside the image.  In the image I provided, the red arrow is where I'd like the text to be but no matter what I put in the CSS file, the text begins to the lower right of the image floated left.  Can anyone help me figure out what is going on?  The code for the HTML is located here http://codeviewer.org/view/code:1f51  The code for the CSS is here: http://codeviewer.org/view/code:1f52 
    I am using the CSS code from a website I designed that works fine in that website.  Why isn't it working here?  The image name is "fundraiser.jpg"
    Thanks for your help!

    Problem is due to you not declaring the correct instructions for the class .float-left css selector:
    Change this:
    .float-left {
    margin: 5px 10px 0 0;
    To this:
    .float-left {
    float: left;
    margin: 5px 10px 0 0;

  • How can I insert text to the right of the right hand indent?

    I need to format data in a text box so that the data is separated into three columns defined by tab locations.  The data located at the second tab (column) has varying lengths so that at times it needs to wrap.  I need to have the data wrap before it gets to the next tab (third column).  What I am trying to accomplish can be done in Microsoft Word by setting the tab to the right of the right hand indent.  I can also get the look I am trying to achieve by using a table but because the data I am using is coming from a database the interface will not allow me to use the table function.  Any suggestions will be much appreciated.
    Thanks

    The way the data is served to the InDesign document.  The data can only be flowed into a text box.  It cannot be flowed into a table.  If I can find a way to solve my issue then the data can be placed on the page using a style instead of flowing the data onto the page and then having to cut and paste it into a table.
    KEN HAVENER | Business Process Engineer
    Phone: 920.406.3479 | Fax: 920.406.3479
    Email: [email protected]
    Please consider the environmental impact before printing this email.

  • How do I get the scroll bar back to the right side of the screen and how do I get the mouse scroll wheel to work again?

    Yesterday the scroll bar on Firefox was moved from the right to the left of the screen and the webpages do not scroll when using the mouse scroll wheel.

    Reset the pref <b>layout.scrollbar.side</b> to '0' or set to '2' to place the scroll bar at the default right side.
    See:
    * http://kb.mozillazine.org/layout.scrollbar.side
    * http://kb.mozillazine.org/about%3Aconfig
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]

  • Troubleshooting: Scroll bar goes to the right in LR2.3

    Not sure why this happens, but every so often - maybe once every couple days, I will be working in either the Library or Develop module and for no apparent reason, the scrollbar for the bottom filmstrip just starts moving on its own accord to the right until it gets to the end of the filmstrip. It keeps going to the right unless I close the program and start it back up again and then everything is fine again.
    Wondering why this occurs.
    Thanks

    kglad - that works perfectly.
    I was looking at the UIScroll component's properties, It
    never occurred to me to look at the TextField properties.
    Thanks.
    JL

  • How to perfectly align a JLabel text to the right

    if you compile and run this code:
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.EmptyBorder;
    public class JLabelAlignmentTest extends JPanel {
      private GridBagLayout gridBagLayout1 = new GridBagLayout();
      private JLabel jLabel1 = new JLabel();
      private JLabel jLabel2 = new JLabel();
      private JPanel jPanel1 = new JPanel();
      private JPanel jPanel2 = new JPanel();
      public JLabelAlignmentTest() {
        try {
          init();
        catch(Exception e) {
          e.printStackTrace();
      private void init() throws Exception {
        setBorder(new EmptyBorder(10, 10, 10, 10));
        jLabel1.setHorizontalTextPosition(SwingConstants.RIGHT);
        jLabel1.setText("888888");
        this.setLayout(gridBagLayout1);
        jLabel2.setHorizontalTextPosition(SwingConstants.RIGHT);
        jLabel2.setText("888881");
        jPanel2.setBackground(Color.orange);
        jPanel1.setBackground(Color.orange);
        this.add(jLabel1,  new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
        this.add(jLabel2,   new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
        this.add(jPanel1,    new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
        this.add(jPanel2,   new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
      public static void main(String args[]){
        JLabelAlignmentTest test = new JLabelAlignmentTest();
        JFrame frame = new JFrame();
        frame.setContentPane(test);
        frame.pack();
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }you'll see that the JLabel which contains the text "888881" is not perfectly alignedto the right: the "1" character is handled as if it was larger (like "8" for example), so a few pixels remain on the right. I want any number to be EXACTLY aligned to the right, how can I work around this (little, I know) imperfection?
    thanks

    That is perfectly aligned, the "space" is in the make up of the font glyph. If you want to create your own font where each character is the exact same widht as each other, then feel free to do so (I for one wouldn't want to use it).

  • How can you delete text to the right

    I would like to be able to delete characters to the right , Using the keyboard Ie opposite to backspace

    Sorry, it doesn't support that.
    There may be a bluetooth keyboard out there that supports right delete, but using the on screen keyboard  is left delete only

  • Updated controller but its not showing the right version

    I just updated my 4404 controller with 7.0.116.0.
    After I rebooted and check the version number on the monitor page, it tells me its still version
    7.0.98.0. The weird thing is, is that the Emergency Image Version is what changed to version 7.0.116.0.

    anyone?

  • Iphone: How to show the right text with the right encoding?

    Hello,
    I still have a problem with the encoding. In fact, I'm trying to reuse the Sample Code for iphone here [SeismicXML |http://developer.apple.com/iphone/library/samplecode/SeismicXML/index.html] to parse a XML document.
    I have a problem with it when using the encoding ISO-8859-1 for the XML Document.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    The text showing isn't correct.
    Do you guys have any idea about it?
    Thank you,
    HeoU

    Anybody can help me at this point, please?
    Thanks
    HeoU

Maybe you are looking for

  • Why will twitpic pictures not load in firefox but will in internet explorer?

    Why suddenly have twitpic pictures stopped loading in Firefox. They load in internet Explorer but just stopped loading on the twitpic site in Firefox??

  • Mini DVI solution - SwitchResX or just VGA?

    I have a G4 mini. I just bought a Viewsonic VG2030WM monitor (1650x1080). It works decently over DVI out of the box, but I've noticed that the signal dies when some of the OS X screensavers run for too long. Pretty sure it's the usual TDMS issue... t

  • Problem faced when automating the P.O and P.O Release transactions

    Hi, I was trying to automate the Purchase Order and Purchase Order Release screen using ECATT tool. I recorded the Purchase Order screen by importing the Purchase Requisition Number. When i record the Purchase Order screen, the screen settings was di

  • Flash Detection Question

    I am trying to include some script for flash detection on my site to ensure that my viewers have the right flash player. Does the Flash Detection Kit also include detection for ActiveX? The reason I ask is because I have a page that some of my viewer

  • NIMCInit.dll NI-PAL Service Manager Error

    Hello all, I'm getting the attached NI-PAL Service Manager error every time I start my computer.  I've tried solution given in this post: http://forums.ni.com/ni/board/message?board.id=240&message.id=4362 thread with no luck. If I uninstall the NI-Mo