How can i make a JTextField not scroll

i have a JTextField which can show 10 columns, while i setText 20 cols, but i do not want the TextField scroll to show it all, any idea? thx

Setting the columns on a JTextField is only used so Swing knows how big to paint the JTextField. It you want to limit the number of characters that can be contained in the JTextField, then you should use a Custom Document. The Swing tutorial on "Using Text Components" will explain more about Custom Document and give you and example document that limits entry to 300 characters:
http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html

Similar Messages

  • On my Mac desktop I must have changed a setting so that now when I move the mouse the open windows fly off to the sides and I can't see them. They come back when I move the mouse, but it is so annoying. How can I make the windows not disappear like that?

    On my Mac desktop I must have changed a setting so that now when I move the mouse the open windows fly off to the sides and I can't see them. They come back when I move the mouse, but it is so annoying. How can I make the windows not disappear like that?

    Click on the Hot Corners..  button and look at the four definitions.  In the picture below, if you moved the cursor to the right top of the screen, it would slide all the applications off the screen as you describe and show the desktop.  Set it to "-" to deactivate.

  • How can i make my keyboard not to appear on my i pad, how can i make my keyboard not to appear on my i pad

    how can i make my keyboard not to appear on my i pad, how can i make my keyboard not to appear on my i pad? couse i want to play a game and is coming on the screen is really iritating ..

    You cannot have the keyboard gone altogether, because it has to come up when an app needs input. The best way to do what you want to do is make sure that no apps are running when you are to go gaming: double click the Home button, swipe up all pages that show (not the app icon but the app page). then start the gaming. It it then still comes up, you look at what app is asking for it and set push notifiactions and autotarting off for that app in the settings.

  • How can I make .PDF files not display inline in an Outgoing mail?

    I want Mail to NOT display PDF files in outgoing messages. It will keep the icon placeholder if it's more than two pages, but not for one page PDFs. How can I stop this? It makes formatting kind of difficult.
    Thanks

    I knew. But I'm hoping for a way to make this the global default since ages...

  • How can I make my iphone not auto open iphoto?

    I have an iphone 4 and I'm running Mac OS X Snow Leopard 10.6.7 on MacBook Pro.  My iphone is running iOS 4.3.3.
    My problem is, is that every time I plug my iphone in to my Mac it automatically opens iphoto 8.1.2 Vers.
    How do I make it stop?

    Go into iphoto preferences and tell it to do nothing when a digital camera is attached.
    It will not open when any camera is attached.

  • �How can i make my program not to shutdown after using wsimport on runtime?

    I have this code:
    // More code before this one
    WsImport ws = new WsImport();
    String[] s = new String[3];
    s[0] = "-d";
    s[1] = "wsdl";
    s[2] = URL;
    try {       
        ws.main(s);
    } catch (java.lang.Throwable e) {
    // More code after this onewhen ws.main(s) finish its job it forces my program to shutdown too ='(
    How can i fix that?
    Any help will be really appreaciated.

    kevjava wrote:
    jschell wrote:
    [...] run it in another app and interact with it from your main app.As shown in the example here:
    [http://www.java2s.com/Code/JavaAPI/java.lang/ProcesswaitFor.htm|http://www.java2s.com/Code/JavaAPI/java.lang/ProcesswaitFor.htm]
    If the other application's main() method is calling System.exit(), this is the only semi-sane way that i know of to get around it.thanks, it worked:)

  • How can I make itunes play not only marked tracks?

    Hi,
    I've set marks on many tracks in my itunes media storage so I can syncronize them wth an ipod nano 16gb.
    But the problem is only with itunes on my windows 7 x64 computer.
    I want itunes to play randomly all of my tracks, not only choosen to syncronize with ipod!
    But it plays only choosen tracks. I don't want to mark or dismark all tracks, because it will ruin the syncronization with ipod )))
    Is there some properties in itunes to solve this? thx in advance

    iTunes selects the tracks to play based on the checkmarks. If you want to use all of the music to listen to, you need to have it checked. If you want to only sync selected music with the iPod, you can create a playlist with the music you want, and then as you desire a change, add or subtract to the playlist. That way, it does not interfere  with your random play in iTunes, and still allows you to modify your song list on the iPod.

  • How can I make a file not read only? Using LV6.0, I have tried the Access Rights VI w/o luck.

    I am talking about any file in windows 98 that has the read only box checked when I look at the properties of the file from Windows Explorer. I can can get rid of the check from the properties box, but I want to do it programmaticaly in LabView.

    Hi,
    Wire in '448' to the 'New Permissions' of the Access Rights VI. This will set the file as readable, writable and executable. I just tried this (on WinNT, though).
    The 'permissions' parameter is a 16-bit integer where the least 9 bits are used. Of these, for Windows, bits 8, 9, and 10 (0-indexed) are important (i.e. if these are set = integer 448). See online Help for full details.
    Hope this helps,
    Khalid

  • How can I make the keyboard not to appear on the screen automatically ?

    .

    Hi Parrotever,
    Welcome to the Support Communities!
    The onscreen keyboard usually appears anytime you tap in a field to enter text.  If you tap in another area of the document or web page, it should disappear.   There should also be an area in the bottom right corner of the onscreen keyboard that you can tap to hide it.  See the information in the iPad User Guide below:
    Enter text - iPad User Guide
    http://help.apple.com/ipad/7/#/iPad997da459
    Hide the onscreen keyboard. Tap the Keyboard key.
    If that option isn't available, I would suggest closing the app and restarting the iPad to refresh it.
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    Turn your iOS device off and on (restart) and reset
    http://support.apple.com/kb/ht1430
    Cheers,
    - Judy

  • How can I make my computer not turn off (sleep mode, or hybernate)? While plugged into the wall.

    I have two dogs, and i am trying to see which one is tearing up my couch while im away by recording via my built in camera and "iMovie". But after a few times trying, I relised that my computer "sleeps" or "hybernates" after only a half an hour. It is plugged in, and i went to System Prefrences > energy saver > then clicked on power adapter and moved both "computer sleep and display sleep" to never. turned off my screen saver. and still having issues with this. Am i missing somthing?
    Tony

    Thank you Courcoul, i appericate your help. but if you would have read my whole description, you would have noticed i already tried that. "It is plugged in, and i went to System Prefrences > energy saver > then clicked on power adapter and moved both "computer sleep and display sleep" to never." i also did check the schedule times, and it is off, both wake up times, and sleep times. 

  • How do I make a button NOT take focus when it is clicked?

    I am trying to create a virtual keypad and the problem is that when I have a Robot make a KeyEvent for a certain number when a certain button is pressed, the TextField loses focus and the focus is placed on the button that was pressed, so nothing appears in the TextField.
    How can I make a button NOT take the focus when it is pressed?
    Edited by: tox0tes on Nov 28, 2008 8:06 PM

    great. another way is to have a call to myTextField.requestfocus() in the button's actionlistener actionPerformed method, but that leads to tight coupling.

  • How can I make the initial "Meet Mozilla Firefox" window stop opening?

    I update to Firefox 8 today and now every time I go into Firefox I keep getting the "Meet Mozilla Firefox" window. How can I make that window not open again?

    It sounds like maybe your home page was accidentally set to include multiple pages, including the add-on manager. Try opening the Firefox options window and pasting the address of just your desired page in the "Home Page" field.
    For more details, see: '''[[How to set the home page]]'''

  • TS3988 When I try and log into the icloud, I get a message that my Apple ID is valid but not an icloud account. How can i make it one?

    Whin I try and long into the icloud, I get a message that my Apple ID is valid, but the it is not an icloud account, how can I make it one?

    To use iCloud on a PC, you must first set it up using a device with iOS5 or a Mac with OS X Lion.

  • How can I make a title (text) on a postcard vertical not horizontal text?

    How can I make a title (text) on a postcard layout vertical not horizontal text?

    Insert it in a Text Box then rotate this one.
    Yvan KOENIG (VALLAURIS, France) lundi 13 juin 2011 16:20:28
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own
    before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How can i make a soft return with pages shift enter does not work!

    how can i make a soft return with pages shift plus enter does not work!!

    On full keyboards with a numeric keypad, the key above the right shift is "return" & the one on the numeric section is "enter." On a Mac (or Apple IIgs ) they do have separate functions. On the "mini" keyboards, both names are on the same key, but "enter" is written in smaller letters. I'll have to check to see how that works on another Mac later today.

Maybe you are looking for

  • Duplicate records In Master Data

    Hi, I don't understant why we get Duplicate records in Master Data though it has got the overwritten functionality..    Any idea will be appreciated..

  • IMac, Netgear wireless router & Airport express

    I've recently purchase my first apple mac: a iMac G5 and would appreciate some help regarding my wireless set-up. In a nut shell... I have netgear wireless ADSL router in one room (physically connected to a PC but that's not really relevant). The nex

  • PA30 Screen Field

    Hi all, For a particular User, if he executes the PA30 tcode and sees an overview  a particular infotype the there are two field which are seen in DE language and rest of the screen feilds in English. Pls help how to convert those two screen field wh

  • Deployment Manifest Error

    Hi, I am getting the below error when trying to deploy using Deployment Manifest. "could not create the directory "c:\program files (x86)\Microsoft SQL Server\100\DTS\Packages\". Access to the path 'c:\program Files (x86)\Microsoft SQL Server\100\DTS

  • Is there any excel-like UI component?

    Heya! Im trying to list some media info up on the screen, and i think the most clean way i can think of right now is to place all the info in a sort of grid. A fine example of that grid is like the one Spotify uses. Im not all that familiar with java