Macintosh Swing

I'm having trouble compiling the swing example code provided in the tutorial. the error is javax.swing.*; package not found. I'm using MRJ 2.2 on my mac. do i need a newer version of mrj? do i need a seperate package all together? help

Swing is a separate package from the MRJ. You have to download it from the Sun site and install it on your machine. You'll then have a swingall.jar archive installed, which contains everything you need (although you may have to link against mac.jar as well to have the Macintosh Look&Feel showing properly.
Hope this helps,
Eric

Similar Messages

  • Hindi characters' display in swing components on macintosh

    I have created a swing application that handles devanagari script.(script for Hindi language).The application works perfectly in windows but in apple macintosh
    there is a problem with the reordering of characters in text componets. Reordering means some characters needs to be displayed not in the exact order in which they are stored.I was wondering how this can happen as the application works fine on windows.Also other applications like text editor displays devanagari script correctly on macintosh.
    I tried with several fonts like Arial Unicode MS,Devanagari MT etc/.java

    Try the method setFont(java.awt.Font f) of the class java.awt.Container (which java.applet.Applet extends) with suitable fonts. This doesn't work for 1.1. Only logical fonts name are allowed here.
    You need either to edit font.properties file for corresponding logical font or for MS JVM use com.ms.awt.FontX (get it using Java reflections if you don't have MS SDK) as described at http://www.onjava.com/pub/a/onjava/2001/04/12/internationalization.html?page=1
    or http://www.jadcentral.com/newscentral/feature.jsp?feature_ID=18

  • Devanagari characters' display  in swing components on macintosh.

    I have created a swing application that handles devanagari script.(script for Hindi language).The application works perfectly in windows but in apple macintosh
    there is a problem with the reordering of characters in text componets. Reordering means some characters needs to be displayed not in the exact order in which they are stored.I was wondering how this can happen as the application works fine on windows.Also other applications like text editor displays devanagari script correctly on macintosh.
    I tried with several fonts like Arial Unicode MS,Devanagari MT etc/.java

    Hi Ken,
    You'd be reading the HTML into your Java program using an InputStream of some description.
    You can set the encoding of this stream by using an InputStreamReader to pull everything in through the stream. e.g.
    InputStreamReader isr = new InputStreamReader(myInputStream, "UTF-8");
    The first parameter is your input stream, the second is the encoding that input stream uses.
    The HTML may be in an encoding called "ISO-8859-1", a Windows favourite, or it may be in a Chinese encoding like those I've mentioned (I can't recall the exact encoding strings you'd use in the call for the Chinese ones, but I believe GBK's is "GB-2312" or something similar).
    From there, it's easy to use your HTML encoding specific InputStreamReader to get a bunch of chars or bytes. These will be in the same encoding again. Then, it's just a matter of creating a new String with a better encoding (one that Java prefers, and one that Chinese can display in).
    The easiest way is to do the following:
    String myConvertedString = new String(myHTMLBytes, "UTF-8");
    ... where myHTMLBytes is an array of bytes (byte[]) that have been pulled in through the InputStreamReader. The String should be nice and easy to use from there. A good test would be to create a JLabel with the string as its text. Remember to set the JLabel's font to ArialUnicodeMS, and it should work OK. If it doesn't first up, try "UTF-16" in place of "UTF-8" in the new string declaration.
    In addition, Sun was actually shipping its own Java web browser classes with the JDK for a while. They were unofficial JDK code (i.e. they existed in a com.sun.* package), but they did get shipped. I haven't seen them in a JDK of late, but I know it was an early Unix version, so it might be worth looking for. AFAIK, the classes worked pretty well.
    Hope that helps!
    Martin Hughes

  • Character reordering problem in swing text components  on macintosh

    I have created a swing application that handles devanagari script.(script for Hindi language).The application works perfectly in windows but in apple macintosh
    there is a problem with the reordering of characters in text componets. Reordering means some characters needs to be displayed not in the exact order in which they are stored.I was wondering how this can happen as the application works fine on windows.Also other applications like text editor displays devanagari script correctly on macintosh.
    I tried with several fonts like Arial Unicode MS,Devanagari MT etc/.java

    Very odd. Post your Reordering code.

  • Steps to setup for my  Java Swing Desktop Application on Macintosh

    hi guys,
    I need help from all of u to create the setup for my Desktop application (developed in swings) on Macintosh. pls give me the references at least. how to approach the tools.
    its urgent...please....
    thanks in advance.
    -siva

    hi guys,
    I need help from all of u to create the setup for my Desktop application (developed in swings) on Macintosh. pls give me the references at least. how to approach the tools.
    its urgent...please....
    thanks in advance.
    -siva

  • Bidirectional text in java swing for macintosh

    Hi,
    I have a problem in displaying bidirectional text in Swing text components in macintosh .But in awt components it is displayed properly.Please advice
    Thanks

    What is bidirectional text?

  • Newbie Q: How can I use swing on a Mac

    Can anyone tell me how I can get the swing class libraries installed on my Macintosh? According to the MRJ 2.2.5 (Macintosh Runtime for Java) this is compatible with Swing 1.1.1. But where do I get the class library and where do I put it when I have got it. The only info I have is to see:
    http://java.sun.com
    Well here I am.
    Anyone got any ideas.
    Thanks.

    Here:
    http://java.sun.com/products/jfc/download.archive.html

  • Swing Application on a Mac

    I'm developing a Swing application to be deployed using WebStart on Windows as well as Macintosh platforms w/ the Mac-mini being the primary at this time.
    Development is being done in Windows where everything looks good. When run on a Mac, there seem to be component size calculation issues.
    In another post about deploying an applet having similar problems with text fields, just enabling the Smooth Text in Applets solved it. This, however, is not an applet but an application and that solution has no impact.
    Any suggestions?

    Set the LookAndFeel specifically pointing to one of the Look and Feel available. Guessing you might NOT have set any specific look and feel.
    Example:
    UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
    Let us know if it worked.

  • Launching Browser from Swing Applicaton....

    Hi,
    i am launching browser from my swing application.While opening HTML file, always the HTML file goes behind the application.Everytime i have to maximize the html file window.
    i want the HTML file to come up in front of the swing application.
    any help please ??? itz very urgent.....
    Thanks in advance.
    Manikandan

    Browser Utility - Class to launch a URL in a web browser in
    a platform independent manner. Includes an optional swing
    GUI allowing user customization. [Open Source - GPL]
    http://ostermiller.org/utils/Browser.html
    BrowserLauncher - Open the system web browser with
    particular attention paid to various Macintosh systems.
    (Freeware)
    http://browserlauncher.sourceforge.net/
    Java World - With a little platform-specific Java code, you
    can easily use your system's default browser to display any
    URL in Windows or Unix.
    http://www.javaworld.com/javaworld/javatips/jw-javatip66.html
    JConfig - Class Libraries that allow a URL to be launched in
    a browser on Windows, Unix, or Macintosh. [Commercial]
    http://www.tolstoy.com/samizdat/jconfig.html
    Apple - MRJFileUtils.openURL() not implemented in Mac OS X.
    http://developer.apple.com/techpubs/macosx/ReleaseNotes/JavaGMWebReleaseNotes.html#MRJToolkit
    Apple - How one would open a URL in a web browser on a
    Macintosh.
    http://developer.apple.com/qa/java/java12.html

  • Hindi characters' display in swing components on mac

    I have created a swing application that handles devanagari script.(script for Hindi language).The application works perfectly in windows but in apple macintosh
    there is a problem with the reordering of characters in text componets. Reordering means some characters needs to be displayed not in the exact order in which they are stored.I was wondering how this can happen as the application works fine on windows.Also other applications like text editor displays devanagari script correctly on macintosh.
    I tried with several fonts like Arial Unicode MS,Devanagari MT etc/.java

    OK, I asked the FTE team and got this reply: "Lucida Grande is CTS's fallback font for Thai.  This font on OS 10.7 and 10.6 are not supporting Thai anymore.  The version on 10.5 was supporting it." This means that it's our bug that we keep using Lucida Grande as fallback font even Apple dropped support Thai script with that font after 10.6. Unfortunately this bug was deferred from current development release (11.2) because of time constraint. If this support is critical for your business, can you open a bug in our public bugbase and ask as many vote as possible? In this way I may be able to convince internal team to fix this bug in next release.
    Thank you for your feedback!
    Hitomi

  • Swing support on Mac OS browsers

    Hi,
    I was wondering if Swing (and Java 1.2 or later) are supported on MacOS.
    I've read that Mac OS X ships with Java 1.3.1. But, do the Internet Explorer and Netscape versions on Macs support Java applets that use Swing?
    I can't find any information on how to handle the automatic download for the java plugin for Macintosh platforms using the <object> tag with codebase parameter (the only examples I see point to cab files which distinctly say windows or i586). Do the <object> tags work on Mac platforms anyway(because I've always used the <object> tag instead of the applet tag because it supports automatic download of a verison I can specify)?
    Also, I've only been able to find documentation that browsers on Mac OS9 and earlier only support java 1.1.8. So does that mean, our applets that use Swing will not work on Mac OSes before X?

    As per my knowledge, u can use JJEdit editor on MAC OS X. By using this editor, you can run the applets. Here I am using JJEdit as a java editor on MAC OS X. just dowload the JJEdit. and run the applet on it.
    regards
    nr konjeti

  • Swing Applets and javascript

    I'm writing a swing applet to do some rich text editing, mainly bolding, italicizing, etc as well as support for special characters (greek letters, etc). Rather than using the HTMLEditor kit (which I've heard suspect things about), I am going through the document tree and creating a corresponding HTML version of the string (inserting HTML entities based on position in the document). I am planning on exposing these to the client via javascript, but I have run into some problems with document.applets.appletName.publicMethodName. I've gotten this to work on IE for the PC. I am aware that there are some issues with the Sun plug-in for Netscape on PC. An additional complication is that this needs to work on a Macintosh as well. Does anyone know if the MRJ plugin supports this behavior (for both IE and Netscape)? Is there a better way to go about doing this, rather than using javascript to expose the HTMLized version of the string? Thanks in advance.
    Tim

    You must to check if the mrj plug-in is the same version to the jre1.3, because the jre 1.3 supports the javascript events. other way is incorporate in your applet the javascript class, in the next web page you will find the js.jar http://www.mozilla.org/rhino/download/
    if you have troubles write me to
    [email protected]
    good luck
    Carlos Sanhueza
    Santiago de Chile

  • Turning JAR into Linux or Macintosh Program

    Hello,
    I've seen a variety of options available for turning JAR files into windows executables, but is there anything available for turning them into a Linux or Macintosh program? We would like to turn our JAR files into such things to protect them a little better from reverse engineering (even though this is a lofty goal that is likely impossible) but it is important to us to maintain cross-platform compatability. Since there are so many tools available for windows, I am led to believe that someone out there must have done something similar for other operating systems. Anyone have any links or know of any software that would be good for this?
    Thanks

    In the Linux side: I've never used the Java GNU compiler (gcj), but it deserves a try. It can be used to compile Java programs and transform them into true executables.
    Beware - I believe that gcj can't be used to compile Swing or AWT programs (maybe neither SWT programs...), but check the gcj documentation.

  • Launching Browser From Swing Application - Help Needed

    Hi,
    I am opening a HTML file in Internet Explorer from my swing application.
    I am using the code given below
    private final static String WIN_FLAG = "url.dll,FileProtocolHandler";
    private final static String WIN_PATH = "rundll32";
    String cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
    // url is HTML file Path
    Process p = Runtime.getRuntime().exec( cmd );
    The HTML file is opening up,but it always opens behind the swing application,that makes me every time to maximize the HTML file after it being opened up.
    I want to open it in front of the Swing Application.
    Any Help Please ?
    - Manikandan

    Browser Utility - Class to launch a URL in a web browser in
    a platform independent manner. Includes an optional swing
    GUI allowing user customization. [Open Source - GPL]
    http://ostermiller.org/utils/Browser.html
    BrowserLauncher - Open the system web browser with
    particular attention paid to various Macintosh systems.
    (Freeware)
    http://browserlauncher.sourceforge.net/
    Java World - With a little platform-specific Java code, you
    can easily use your system's default browser to display any
    URL in Windows or Unix.
    http://www.javaworld.com/javaworld/javatips/jw-javatip66.html
    JConfig - Class Libraries that allow a URL to be launched in
    a browser on Windows, Unix, or Macintosh. [Commercial]
    http://www.tolstoy.com/samizdat/jconfig.html
    Apple - MRJFileUtils.openURL() not implemented in Mac OS X.
    http://developer.apple.com/techpubs/macosx/ReleaseNotes/JavaGMWebReleaseNotes.html#MRJToolkit
    Apple - How one would open a URL in a web browser on a
    Macintosh.
    http://developer.apple.com/qa/java/java12.html

  • Swing browser help needed

    I am developing desktop application which has a functionality of web browser i have tried JEditorPanel which is used to load html pages.
    the problem with this is it doesnt load even google.com or yahoo.com , like Internet Explorer , Mozilla etc. Neither it loads the pages containing flash , please let me know how can i do this.
    I have a jpanel form on click of menu or button i want to call another jpanel form . i have tried with jFrameForm and it works but same doesnt work with jPanelform
    Please help . your help will be appreciated
    thanks

    Browser Utility - Class to launch a URL in a web browser in
    a platform independent manner. Includes an optional swing
    GUI allowing user customization. [Open Source - GPL]
    http://ostermiller.org/utils/Browser.html
    BrowserLauncher - Open the system web browser with
    particular attention paid to various Macintosh systems.
    (Freeware)
    http://browserlauncher.sourceforge.net/
    Java World - With a little platform-specific Java code, you
    can easily use your system's default browser to display any
    URL in Windows or Unix.
    http://www.javaworld.com/javaworld/javatips/jw-javatip66.html
    JConfig - Class Libraries that allow a URL to be launched in
    a browser on Windows, Unix, or Macintosh. [Commercial]
    http://www.tolstoy.com/samizdat/jconfig.html
    Apple - MRJFileUtils.openURL() not implemented in Mac OS X.
    http://developer.apple.com/techpubs/macosx/ReleaseNotes/JavaGMWebReleaseNotes.html#MRJToolkit
    Apple - How one would open a URL in a web browser on a
    Macintosh.
    http://developer.apple.com/qa/java/java12.html

Maybe you are looking for

  • How do I get 'lost' songs to reappear in my iTunes library?

    I have files that have stored themselves into different folders within the iTunes Music folder(C:\Documents and Settings\admin\My Documents\My Music\iTunes\iTunes Music\iTunes Music) and many of the songs in this folder do not appear in my library. I

  • Exporting a single table from an acrobat created form

    I created a 5 page document InDesign (CS5.5), On one page I created a table that is 4 columns x 25 rows (with the first row being a header), using the table feature. I then exported to pdf and finalized the form in Acrobat 9.2 Pro. After running the

  • Importing DVD to Ipod

    I am trying to import a musical dvd to my Ipod nano but the disk is not recognized in Itunes

  • Itunes store account verivication doesn't work.

    My internet explorer gives a fatal error while loading the screen. Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.1; .NET CLR 3.5.21022;

  • Jam Pack Error

    I upgraded Logic Express 8 to Logic Studio 9 last night on a 2007 Intel Mac and clicked on all install options. It took a long time, but it is running fine even though at the end of the installation it said that a major error had occurred; however, I