How can make JTextField display all ASCII character?

I am writing a java app. There is a Jtextfield . I need display some special character in this jtextfield such as ASCII code is 135(&#135), 164(&#164), 167(&#167) and so on. Thees characters whose ASCII code is 164, 167 can correctly display in spite of you set any font to this jtextfield. But the character whose ASCII code is 135 can`t correctly display. It display as a [];. Who knows and has some ideas?
Thx. Bob

Thx any way.
Now I found a another way to display the (char)135(display as "�").
First, i defined a static attribute :
public final static String ASCII_CODE_IS_135 = "�";
Then, When I need display the char, I display the static attribute value. I found the textfield almost can display all special character by this way in spite of using what font.
Thx again.

Similar Messages

  • How to make jcombobox display all by itlself?

    Hello all -
    Is there a way to make a jcombobox object display its column of items implicitly?
    For example, suppose a program has a combobox filled up with names. And, suppose the first item says "toggle sort", which affects how the items are sorted in the combobox (eg, pressing it should cause the list to sort the displayed names based on first name, another press bases the sort on the last name...). The behavior I am aiming for is that when the user presses the "toggle sort" item, the combobox displays its items again awaiting further selection from the user (but not the first item). Know how to fire such an event?
    private void namesComboBoxActionPerformed(ActionEvent evt) {
       int selected = namesComboBox.getSelectedIndex();
       if (selected == 0) {
          // some code should result in the namesComboBox displaying its items again. What is it please?
    }

    Here is a simple code, I don't know if its the correct way to do this sort of thing but it works:
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.Collections;
    import javax.swing.*;
    * Sorting Combobox....
    * @author talha
    public class ComboSort extends JFrame{
        ArrayList<ComboData> data;
        JComboBox combo;
        public ComboSort() {
            super("Combo Sorting");
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            populateData();
            Collections.sort(data);
            // I don't know how much of the combobox model should be overridden!
            combo=new JComboBox(new DefaultComboBoxModel() {
                @Override
                public Object getElementAt(int index) {
                    return (index==0)?"Toggle Sort":data.get(index-1);
                @Override
                public int getSize() {
                    return data.size()+1;
                @Override
                public int getIndexOf(Object anObject) {
                    return (anObject instanceof String)?0:data.indexOf(anObject)+1;
            combo.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if(combo.getSelectedIndex()==0){
                        ComboData.toggleSort();
                        Collections.sort(data);
                        //edited to make the pop up visible....
                        SwingUtilities.invokeLater(new Runnable() {
                            public void run() {
                                combo.setPopupVisible(true);
            combo.setRenderer(new DefaultListCellRenderer() {
                @Override
                public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
                    Component renderer=super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
                    if(value instanceof String){
                        renderer.setForeground(Color.BLUE);
                        renderer.setBackground(Color.YELLOW);
                    return renderer;
            // you can remove following....
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    combo.setSelectedIndex(0);
            getContentPane().setLayout(new FlowLayout());
            getContentPane().add(new JLabel("Heads of State:"));
            getContentPane().add(combo);
            setSize(300, 300);
            setLocationRelativeTo(null);
        private void populateData() {
            data=new ArrayList<ComboData>();
            data.add(new ComboData("Barak", "Obama"));
            data.add(new ComboData("Gordon", "Brown"));
            data.add(new ComboData("Nicolas", "Sarkozy"));
            data.add(new ComboData("Angela", "Merkel"));
            data.add(new ComboData("Wen", "Jiabao"));
            data.add(new ComboData("Taro", "Aso"));
            data.add(new ComboData("Manmohan", "Singh"));
            data.add(new ComboData("Asif", "Zardari"));
            data.add(new ComboData("Mahmoud", "Ahmedinejad"));
            data.add(new ComboData("Hugo", "Chavez"));
            data.add(new ComboData("Raul", "Castro"));
        public static void main(String args[]){
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    new ComboSort().setVisible(true);
    class ComboData implements Comparable{
        String firstname;
        String lastname;
        static boolean sortFirstName;
        public ComboData(String firstname, String lastname) {
            this.firstname = firstname;
            this.lastname = lastname;
        @Override
        public String toString() {
            return firstname+" "+lastname;
        public static void toggleSort(){
            sortFirstName=!sortFirstName;
        public int compareTo(Object o) {
            ComboData other=(ComboData)o;
            if(sortFirstName)return firstname.compareTo(other.firstname);
            else return lastname.compareTo(other.lastname);
    }Thanks!
    Edit: Reread your original post and made few editions... but I still don't think that this is what you need (but now its much better) :-)
    Edited by: T.B.M on Apr 19, 2009 1:16 PM

  • How can a  variable display the first character that's on the page?

    I'm creating a telephone directory and want each page to display the alphabet of the first listing on the page on the top - only one character.
    Can you tell me how to do this?

    Hmmmmm, seems I was wrong about the GREP styles. I just tried it and they don't get picked up. I consider that a bug, but it's probably "as designed."
    That leaves you having to work with nested styles only, or Find/Change. I think what you'll need to do is redefine the Paragraph style so it has two nested styles that apply the correct style to whatever needs to be styled at the start of the paragraph, one for the first character and the second for the rest of the word(s) if you can figure out a trigger (can InData add an end nested style character or is thew some punctuation you can use?), then find/change to remove the applied character style. For that I'd serach for ^.+ with the find format set to the character style that InData applied and the chane format set to [None], which will only remove it from the beginning of your paragraphs. If this is done correctly there will be no change in appearance since the redefined paragraph style will do the formatting.
    If that won't work, you can use find/change to apply a new style to the first characters. Search for ^. and set the change format to the new character style that you'll use in the variable. It needs to have the same attributes as the style applied by InData or the appearance will change.
    The second method is probably easier since you don't need to redfine the paragraph style, but both methods require you to use find/change to alter the text, which means if more text is added you'll need to re-do the find/change. Not a big deal, but don't forget. I'd be tempted to wait until the last minute and just ignore the headers for the moment, if editing is ongoing. I'd also test this on a copy of the file for safety.

  • Why teststand can not display the ASCII character which number up to 128?

    Hello All,
            I have encountered a problem on an application for ASCII character,why teststand can not display the ASCII character which number up to 128?
           For example:an expression  Local.xx=Chr(164),
           xx-->string,I can not get the correct string.
           Have any idea for this?
    OS:WinXP,Teststand2012 SP1.
           Thanks a lot.
    Solved!
    Go to Solution.

    dug9000 wrote:
    [...]On Windows 7 at least, the code page setting for the operating system is located in the "Region and Language" control panel in the "Administrative" tab where it says "Language for non-Unicode programs".
    Hope this helps,
    -Doug
    Ah, that explains why i see "European Set"....
    One question, Doug: Obviously, you can select only the localization there. Is this PostScript Characters for all languages? Or is it possible to switch to something like true types, e.g. "Wingdings"? (I know, bad example, but i hope you get the point)
    thanks,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Okay so i recorded a song but each part comes out as like take 1, i have 10 takes. how can i put them all together as one take, to make one song all in one take not small pieces of a song.

    okay so i recorded a song but each part comes out as like take 1, i have 10 takes. how can i put them all together as one take, to make one song all in one take not small pieces of a song. like i hit record and sang the entire song but when i hit play it was in pieces not just one song like it was in ten takes. is there any way i can blend it all into one take, to make one clear song?

    You're not very clear in stating your problem. Maybe it's terminology: "takes" in recording lingo (and in GB lingo) are different version of exactly the same part in a song, so you only want one of them in the end. Please tell us exactly what you did and what it is that you don't like.

  • Hi my name Abukar I had an old apple ID and I had problem with signing it so I decided to make a new apple ID with a new email address, so how can I link with two apple IDs and how can I get back all my previous apps that I purchased before, I cloud stuff

    Hi my name Abukar I had an old apple ID and I had problem with signing it so I decided to make a new apple ID with a new email address, so how can I link with two apple IDs and how can I get back all my previous apps that I purchased before, I cloud stuff

    It is not possible to do that.
    Allan

  • HT5625 I cannot send a text thru iMessage.  I followed the directions over and over again but can't make it work.  Also how can I find out all the apple ids I may have.

    I cannot send a text thru iMessage.  I followed the directions over and over again but can't make it work.  Also how can I find out all the apple ids I may have.

    A wet phone is out of warranty. This is considered user damage. Even if you were able to get it to start now, the chances of it working for long are slim. I suggest going to Apple and see about an OOW replacement. One for the iPhone 4 is only $149USD and it would come with a short warranty. It is a refurbished device and you would not be worried about encountering additional problems.

  • After downloading iOS 7 on my 4S I show 8,976 on my email icon.  How can I eliminate them all without going one at a time?

    After downloading iOS 7 on my 4S it shows 8,976 on the email icon.  How can I move them all to trash without doing it one at a time?

    Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • How can I shut off all of the pop-up windows for all the Firefox updates?

    How can I shut off all of the pop-up windows for all the Firefox and Thunderbird updates?
    Apparently now Mozilla creates new versions of their browser and email apps every two weeks instead of just creating updates... I'm tired of all of the pop-up requests for these constant installation requests and all the problems that the new version installations create... I just want to use the software and be left alone.
    I can't find a way to make Firefox and Thunderbird stop with the pop-up requests for new installations... is there a way to do this or has Mozilla just got it rigged so one can't just use the software without re-installing a new version every two weeks and running in to new plugin issues and missing features every time?
    Help!
    Thanks,
    numetro

    Is it possible that her computer is infected with malware.
    Do a malware check with several malware scanning programs on the Windows computer.
    Please scan with all programs because each program detects different malware.
    All these programs have free versions.
    Make sure that you update each program to get the latest version of their databases before doing a scan.
    *Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
    *AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
    *SuperAntispyware:<br>http://www.superantispyware.com/
    *Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
    *Windows Defender:<br>http://windows.microsoft.com/en-us/windows/using-defender
    *Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
    *Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
    You can also do a check for a rootkit infection with TDSSKiller.
    *Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • I am uploading receipts using the PURCHASE_ORDER_RECEIPT EIP.  When I upload serialized assets each one is processed as a separate receipt (receiver_id). How can I have these all aggregated on the same receipt?

    I am uploading receipts using the PURCHASE_ORDER_RECEIPT EIP.  When I upload serialized assets each one is processed as a separate receipt (receiver_id). How can I have these all aggregated on the same receipt?
    Is there a parameter I should be using in the XML or is there a setting in Peoplesoft that will accomplish this?
    Jim

    sundy.liu wrote:
    Unfortunately however, even with the TCP tweaks enabled, I still only get a little over 1 Gb/s through the two aggregated Gig ports. It seems as though the aggregation is only using one port, though MRTG graphs of the two switch ports do in fact show that they are both being utilized equally, essentially splitting the 1 Gb/s speed between
    the two ports.
    Problem with the server? switch? Aggregation software? All the above? At any rate, I seem to be missing something.. Any help regarding this issue would be greatly appreciated!If you're only running a single stream, that's all you'll see. Teaming/aggregating doesn't make one stream go faster.
    If you ran two streams simultaneously, then you should see a difference between a single 1G interface and an aggregate of two 1G interfaces.
    Darren

  • I have more songs than I can put on Ipod.  How can I un-click all songs in an album without doing each singly, to reduce space? Thanks

    I have more songs than I can put on Ipod. Will unclick some songs but one at a time is taking forever. How can I un-click all songs in an album without doing each singly, to reduce space needed on iPod? Thanks

    Why not try syncing a smart playlist that updates automatically every time you sync your iPod?
    Try something like this:
    1. Pull down File > New Smart Playlist;
    2. Playlist IS Music; click the plus button;
    3. Last Played IS NOT in the last 90 days;
    4. Select the option to Limit to xxx items selected by Random and click OK.
    Name the playlist that is created something distinctive then sync you iPod with that. It will automatically update based on the last played dates of a tune and you'll always have fresh content on your iPod. Modify the playlist as needed to make it give you the results you want.
    Regards,
    Michael

  • How can I remove 'Open all in tabs' from my bookmarks?

    How can I remove 'Open all in tabs' from my bookmarks? It's very annoying when you click on it by error. I downgraded from 29 to 28 because of the various bookmark issues I was having. I never had this issue with previous version of FF, why did they have to mess with stuff that was working.
    I love the new layout. Thanks

    Firefox 28 contains security vulnerabilities. It's best to start a new thread (ask a new question) about the other issues you're having with Firefox 29 and resolve them.
    * https://www.mozilla.org/security/known-vulnerabilities/firefox.html
    # Install Stylish and restart Firefox when prompted.
    #* https://addons.mozilla.org/firefox/addon/stylish/
    # Open the Add-ons Manager (Ctrl+Shift+A).
    # Click User Styles on the left.
    # Click the Write New Style button at the top. Paste the following in the text box, give the style a name, then click the Save button.
    <pre><nowiki>
    @namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
    #BMB_bookmarksPopup .openintabs-menuitem,
    #bookmarksMenuPopup .openintabs-menuitem {
    display: none !important;
    </nowiki></pre>
    If you don't want to install an add-on, you can use the ''userChrome.css'' file instead, but I don't recommend it.
    * http://kb.mozillazine.org/UserChrome.css

  • HT1766 My ipod 4g keept crashing so then i read on this website to go to settings and rest everything. And when i did everything on my ipod got deleted.I tried restarting it but i didnt restore my ipod before everthing got erased. How can i get it all bac

    My ipod 4g keept crashing so then i read on this website to go to settings and rest everything. And when i did everything on my ipod got deleted.I tried restarting it but i didnt restore my ipod before so everthing got erased. How can i get it all back???

    Restore from backup if you have one:
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        

  • How can I take out all my HealthVault data?

    As titled, how can I take out all my HealthVault data?

    Hi,
    I'm assuming by "take out" you mean you want to save copies of your data to keep outside of HealthVault.
    In general, you want to use the Export feature. Find it by going to the Health Information page, then in the "More actions" menu, choose "Export information." If you're trying to send the data to another system, then you'll probably want to choose CCD or
    CCR format. If you are keeping records for yourself, HTML would be the human-readable format. The different formats behave differently, so I'd recommend checking that the exported file contains the data you want.
    After you export, then you'll want to go into the Files section of the Health Information page and download the files you want to keep. This will be especially important for files that came from a doctor, hospital, pharmacy, or lab.
    If you want to close your HealthVault account, make sure you've got all the data you want before you close the account. By the way, if by "take out" the data you meant "delete" the data, when you close your account the data will be deleted from HealthVault
    as per the Privacy Statement.
    Hope this helps,
    Kathy

  • ı have 2 account one gamecenter with single emaill and password.it is like a identical twins of different.how can ı make it single?

    ı have 2 account one gamecenter with single emaill and password.it is like a identical twins of different.how can ı make it single?

    Are you referring to 2 iTunes accounts/Apple ID's? If so you can't, all purchases are tied to each Apple ID so if you need to say reload an app or update, it would be with that account. 

Maybe you are looking for

  • Download error after mountain lion upload

    HI After I upgraded to 10.8 mountain lion I have since struggled to download firefox and adobe flash (get the error image file corrupted). Also I can't download in itunes (get error 50 or 8000). I have tried: reboot software update Recovery boot and

  • Document Drafts Report, Draft Open & Close: understading

    Hello Experts, In Sales - A/R > Sales Reports > Document Drafts Report >> In selection criteria I selected full Sales - A/R area: In Document Drafts Report, there is a column about which I want to ask Status >> Values: a. Open b. closed Can you pleas

  • Strange error when downloading blob

    ADF 11g Hello I have a pdf file uploaded to the DB as a blob column. I am now trying to download it. I've tried to convert the Kuba [http://kuba.zilp.pl/?id=1] example from ADF 10 to 11. I have page showing an af:table. Clicking on the filename colum

  • Unknown issue while applying effect using "exposure" plugin

    Hi, I am trying to execute a third party plugin called "Exposure4" from my existing automation plugin. I have done something similar before too and had no problem. However, I have encountered some problems while executing this plugin from my automati

  • BootCamp Problem - WIN7 Setup

    Hi all, i want to install Windows 7 64bit on my new MacBook Pro i7 and i used BootCamp. BootCamp make succesfully a Driver-USB-Stick and i have a original Win7-64bit-Ultimate-DVD SP2. Windows 7 Setups boots and its ok, then set language and contiune.