JTextPane buffer and KeyEvent under Windows/Linux

Hi,
I have written a mud client but have 2 problems:
1. Many data are written in the JTextPane and make my client slower and slower. Is there a way to set the max buffer length of this Component? Something like setting a max number lines and when it exceed, it automatically delete the first lines.
2. the other problem is about KeyEvent. I use the constant defined in that class to perform test but it's not working. For example, if the user type the key '8' on the numpad, its code under Linux is not VK_NUMPAD8, anyway the code remains unchanged whatever NumLock is on or off. Should I change my code if the client is used under Windows or Linux??
Thanks in advance.

Check out this tutorial:
http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html
In the part customizing a component there's also something about the keyevents you want to use ...
Gianni

Similar Messages

  • Install PhotoCD Plugin under Photoshop CS4 (64bit and 32bit) under Windows 7.

    Install PhotoCD Plugin under Photoshop CS4 (64bit and 32bit) under Windows 7.

    And that question is supposed to mean what....? Sorry, you need to explain what you are having difficulty with, not just spit out random text fragments.
    Mylenium

  • CI/DB under Linux and AS under Windows - Possible?

    Hello all,
    I have an ECC6 running on Linux/Oracle.
    For some interface reason I need my production to communicate to a MS SQL Server Database - we found out that the best solution was to install a new Application Server under Windows.
    Is it feasable? If yes what are the constraints or does anyone can give me the procedure.
    Thanks for your time and your help.
    Regards,
    Mel

    hi melchior,
    Why not installing MS SQL on Windows Server and connect it to your SAP system without have to install SAP system on this Windows host ?
    It's possible to install SAP system on heterogent system. For UNIX/Linux and Windows system, you need to manage SAMBA service.
    ardhian
    http://ardhian.kioslinux.com
    http://sapbasis.wordpress.com

  • Sync difference (bug?) in the case of admin and user under Windows XP x64. Sudden loss of bookmarks.

    I have just found a problem (a bug?) when syncing my Firefox 11.0 on home desktop under Windows XPx64. Under administrator profile everything is OK. But under the user profile a HUGE amount of bookmarks is lost somewhat suddenly. Just a month ago everything was in the perfect state under the user profile as well.
    No problems for portable devices (Android and iPad) and office notebook (WinXP, admin profile) detected.
    I would appreciate any hints or help on this since I don't do routine work under admin rights on my home desktop.

    Well, resetting sync can solve this problem. Though certain parts of local history on this computer may be lost.

  • Issues with headphones and speakers under Windows

    Sound Card: Sound Blaster Li've! Value (Came with an older Gateway PC)
    OS: Windows XP Professional with SP2
    Problem:
    When installing Windows XP on a clean dri've(Fresh Install) I am unable to get sound from my speakers and headphones at the same time. After numerous testing I've determined that this is simply a Windows XP/SB Li've Value issue of some kind.
    My temporary fix for this has simply been to switch my headphone and speaker plugs on my sound card with each other and go under the sound properties and turn off Digital output. Not a big deal just annoying having to do this.
    I've had this card installed with Windows ME on my system and Windows 2000 and did not have this issue as described above. I simply turned on digital output plugged in both my headphones and speakers to the back of my sound card and had sound from both with no problems what so ever.
    I read somewhere that switching the devldr.exe (which I actually tried) that was installed with windows over to the devldr.exe on the XP setup cd. This actually worked for a moment. Once I rebooted I no longer had sound from both my speakers and headphones.
    What I'm wondering is if I could switch the devldr.exe with either the Windows ME version (not sure if it uses the file) or with the Windows 2000 version would this fix my problem, or has anyone had this problem and found a solution other then what I have stated?
    Thanks

    Snagglepus,The forums are intended for the Community to assist each other, rather than Creative directly. We have Technical Support available by phone and e-mail that can assist anyone that wants help from a Creative technician.
    Switching files from different OS's wouldn't be supported by Creative (or Microsoft, normally), but if someone from the community has tried this they may be able to advise if it worked for them. Perhaps give it a little more time for people to reply, the forums are new.
    You didn't mention what kind of speakers you have connected to the system, this may help anyone that wants to reply to your thread.
    Cat

  • KeyEvent under GNU/Linux

    Hi
    I'm building a simple logindialog with a TextField and a PasswordField that listens to keyevents. when you have typed your name and presses the enter button the cursor will automatically transfer focus to the PasswordField.
    My question is this, I can't get the following if expression to be true???
    if(evt.getKeyCode() == KeyEvent.VK_ENTER) {...}
    and if I print out the evt.getKeyCode() all it prints is 0's.
    have any of you got a similar problem if so how did you solve it?
    thanks in advance
    Marcus

    and if I print out the evt.getKeyCode() all it prints is 0's. You didn't really include enough code to tell what you are doing.
    However, the line above implies that you are listening for the
    KEY_TYPED events. The keycode for a KEY_TYPED event
    is always VK_UNDEFINED (which is zero).
    You might try listening for an ActionEvent instead of a KeyEvent.
    Good luck.

  • SPARCT1 Implementation Guide under Windows Platform

    Hi,
    Just wondering if there is some guide documents about Design and Implementation (just like DVGuide.pdf) but for Windows? I have no experience in Linux. The last thing I did was typing "source ...OpenSPARCT1.1.7.cshrc" but looks like the source command itself does not exist. then I just copied all scripts e.g. rxil, sims, etc to /bin directory of the OS. I tried it under Solaris 10. So now I just try using ISE and EDK under Windows and see if it works. But some guide would be great if any.
    Thank you. I appreciate your help.

    I found the log file here.
    The following files will be modified:
    system.mhs
    system.mss
    The following changes will be made:
    Core microblaze 7.10.d will be replaced by 7.20.c
    Core plb_v46 1.03.a will be replaced by 1.04.a
    Core lmb_bram_if_cntlr 2.10.a will be replaced by 2.10.b
    Core xps_uartlite 1.00.a will be replaced by 1.01.a
    Core mdm 1.00.e will be replaced by 1.00.f
    Core fsl_v20 2.11.a will be replaced by 2.11.b
    Driver cpu 1.11.b will be replaced by 1.12.b
    Driver uartlite 1.13.a will be replaced by 1.14.a
    The following changes need to be made manually by the user:
    Core xps_ll_temac 1.01.b needs to be replaced by 2.02.a
    Core mpmc 4.03.a needs to be replaced by 5.03.a
    Core clock_generator 2.01.a needs to be replaced by 3.01.a
    Core xps_intc 1.00.a needs to be replaced by 2.00.a

  • Website viewing issue with Firefox 3.6 under Windows 7

    I use java script to list current headlines on my website userfriendlypc.net under, "In The News". The website has always looked good under Firefox, IE, Safari, Opera and Google Chrome. Since migrating to Windows 7, Firefox, only Firefox makes the text link in this area look like crap after the first link. The text changes to a greenish color and the hovered link seems offset making it look really bad. This only occurs in Firefox and only under Windows 7. I have tested this under Windows 7 with a basic install of Firefox and under XP. No add-ins or anything else was added when it occurred on the test machine.

    I thought the ClearType configuration would fix the problem as it seemed to clear it up once ClearType was disabled however doing this made other things look like crap. I tried every combination available and this did not fix the problem. I was able to fix the problem however by eliminating the fade function from the javascript on the web page. The "In The NEWS" section still functions properly, just without fading the article titles in and out. A compromise I can live with. Thanks all for your help and hopefully, we won't run into any further problems.
    Steve

  • Accessing DLL buffer data after receiving Windows Message

    Hi,
    I am programming MS4404 bar code scanner using LabVIEW. This is a miniscan and does not have trigger button. So we need to trigger it using Software. 
    Could communicates with scanner to enable. disable, beep, etc....issue is with the decoded data.
    DLL put data in the allocated buffer, and send a windows message WM_XXXX to application. Problem is to check these windows messages and copy the buffer data into application..............struck up here..........There was an example for this scanner but that is in VC and it is using ON_MESSAGE function to catch windows message and memcpy() to copy buffer data into local.........................Not sure how to go ahead in LabVIEW
    Appreciate any help from fellow members...........
    Thanks in advance
    Anil Punnam
    CLD
    LV 2012, TestStand 4.2..........

    Little advancement in the issue......
    I am able to capture windows messages using Windows messages queue library (found on ni.com), Now the issue is with creating buffer for DLL and pulling data from that DLL on successfull Decode of data from scanner.
    I think I am going wrong in giving cirrect data type while creating buffer here.
    Below is the description of the function from manual
    SSIDLL_API int __stdcall SetDecodeBuffer(int nComPort, unsigned char *pData, long max_length);
    where:
    . nComPort is the COM port number used in the call to SSIConnect. pData is a pointer to the destination buffer for decode data returned from the scanner
    . max_length is the size in bytes of the destination buffer 
    I am sure I am going wrong about the pData parameter.
    I need to create this buffer before decoding, so the scanner fills this buffer with decoded data.
    Thanks in advance for your help.
    Anil Punnam
    CLD
    LV 2012, TestStand 4.2..........

  • About SQL and APACHE under XP

    I use jdk1.3.0_02 with apache PHP and mysql under windows XP
    the path on my computer is http://localhost
    I want to test a sql request with this code below but i obtain this
    message "Exception in thread main java.lang.NoClassDefFoundError" :
    import java.sql.*;
    String url = "jdbc:mysql://localhost/neotek";
    Class.forName("com.mysql.jdbc.Driver");
    //I have no pass because apache is running on my computer
    con = DriverManager.getConnection(url,"","");
    Is it a problem about my version of java? or jdbc.Driver? or my pass?

    Nothing as advanced as that. Your driver isn't in the classpath, that's all.

  • Problem's met printers under windows 8.1

    After installing the software for the HP 5220, it is not possible to operate via wifi when I removed the software I can do via wifi printing and scanning under Windows 8.1 printer
    This question was solved.
    View Solution.

    Hi printen,
    Welcome to the HP Forums.
    If you are having an issue with connecting the printer to the computer over a wireless connection with the HP software, I suggest you disable any firewalls or anti virus protection before doing the installation.
    Thanks for your time.
    Cheers,  
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • SubNotFoundException under Linux not under Windows

    Hi,
    I got a RMI client server application. The server runs normal on my windows machine with JRE 1.5. But when I want to run it on my linux server with JRE 1.4, I get the following error:
    java.rmi.StubNotFoundException: Stub class not found: .....
    I used an Ant Build.xml file to create jar (2 --> 1 remote.jar and 1 server.jar) files. In the javac I set the target to 1.1. In rmic I used stubversion and set to 1.1. All my remote objects are in a seperate jar file that is included in my path when I start my server. I start my server with a bat and a sh file.
    run.bat (under Windows)
    set CPBEFORE=%CLASSPATH%
    set CLASSPATH=%CLASSPATH%;PpdaRemote.jar
    start rmiregistry 10001 -J- Djava.rmi.server.hostname=willemc
    set CLASSPATH=%CPBEFORE%;
    java -jar PpdaServer.jar
    run.sh (under Linux)
    CPBEFORE=$CLASSPATH
    export CLASSPATH="$CLASSPATH:PpdaRemote.jar"
    rmiregistry 10001 -J- Djava.rmi.server.hostname=willemc &
    export CLASSPATH=$CPBEFORE
    java -jar PpdaServer.jar
    Can anybody think of a solution for this. I have been working on it for a couple of hours. Upgrading my server to 1.5 is not possible (it's a sgi server).
    Thanks,
    Willem

    Nevermind. Fixed my own problem.

  • Using cinepak codec and JMF under linux mandrake

    Hello,
    I have a big problem using JMF under linux to read video files encoded with the Cinepak codec.
    I don't know if i'm the only one in this situation, so if you are too please let me know :)
    I tested my project under both windows and linux. Under Windows, no problem : the cinepak encoded file is read perfectly. Under linux, it doesn't work. Even if i try to read it with JMStudio. So i think it may be a problem of codec under linux, but it isn't because i can read the video file with a linux video player.
    I don't know what to do and it's very important for my project that i can read cinepak under linux.
    Thanks in advance for any help
    Alex

    well, your not the only one.
    I have it working in Debian, and JDS.(JMF is setup automatically in JDS).(2.6.6 kernel)
    I looked at the installation structure of JDS, and was able to duplicate what they did for Debian.
    Maybe it will work for Mandrake two??
    ok, all you have to do is copy or create soft links from your Mozilla directory, just like you did with the java plugin, and link to all the *.so files in JMF-2.1.1e/lib directory.
    Should work.
    I also read that not haveing the native files only matters if you are doing Capture. not play.
    to get your ATI All-in-Wonder 128 to work, make sure you install the correct driver, and have it working under linux, then try it in JMSTUDIO

  • Under Windows 7 Ultimate x64 and Boot Camp, my 27 inch Apple LED Cinema Display checks out as a Generic PnP Monitor and is shown as NOT HDCP compliant.  I haven't been able to find any kind of an .inf file to use.  Does anyone have a solution?

    Under Windows 7 Ultimate x64 and Boot Camp, my 27 inch Apple LED Cinema Display checks out as a Generic PnP Monitor and is shown as NOT HDCP compliant.  I haven't been able to find any kind of an .inf file to use.  Does anyone have a solution?  Or is Apple's implementation of HDCP (if it's there) incomplete?

    I am having this same issue. Im not sure if this is the cause but I think this is keeping PowerDVD Ultra 11 from playing back Bluray under Windows 7 / Bootcamp

  • I have Firefox 6.0 running under Windows XL. When I forward an email with a URL in it, my recipients tell me the URL is not highlighted and they have to cut and paste it into their browser. Why? How can I get my forwarded URLs to be highlighted?

    I have Firefox 6.0 running under Windows XL. When I forward an email with a URL in it, my recipients tell me the URL is not highlighted and they have to cut and paste it into their browser. Why? How can I get my forwarded URLs to be highlighted?

    If you think getting your web pages to appear OK in all the major browsers is tricky then dealing with email clients is way worse. There are so many of them.
    If you want to bulk email yourself, there are apps for it and their templates will work in most cases...
    http://www.iwebformusicians.com/Website-Email-Marketing/EBlast.html
    This one will create the form, database and send out the emails...
    http://www.iwebformusicians.com/Website-Email-Marketing/MailShoot.html
    The alternative is to use a marketing service if your business can justify the cost. Their templates are tested in all the common email clients...
    http://www.iwebformusicians.com/Website-Email-Marketing/Email-Marketing-Service. html
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

Maybe you are looking for

  • How can i notice the name of global variable ?

    When the customizing.fmx calls the standard.fmx, I came accross an error "FRM-41067 Can not find menu Item". customizing.fmx --> call --> standard.fmx So, I want to assign a global variable to standard.fmx in the customizing.fmx. How can i find out t

  • Data Migration - SAP EC - Environmental Compliance

    Hi, I'm in a Project here in Brazil and they will start to use the portal SAP EC and I have to do the data migration. I read in some manuals about the "Export Excel Template", but I don't know if this is the correct way to do the data migration for t

  • Javafx multiple key events

    I have created a program in which a scene have two objects, and each object reacts when certain key is pressed, for example, when 1 is pressed , object 1 prints it's state,a and when 2 is pressed object 2 reports its state, but the program only work

  • How to set my songs to ringer sounds

    How can I set one of my iTunes to a ringer sound in iPhone 5 s

  • Master Recipe table PLPO

    Dear All, I have a one issue like in Master Recipe Table PLPO Field for Activity Type LAR01 ,LAR02 ,LAR03,LAR04,LAR05,LAR06 Value does not get Updated even i maintain Activity type and it's value in Master Recipe. so from which table i can found Acti