AWT only canvas - styled text, images, word wrap and url posting.. how???

Wassup people!
Ive created a java chat client which uses the JTextPane to post messeges, emoticons and styled text. But the main problem here is that the majority of web browsers only support awt. Telling the users to download the latest jre with swing is long and most would rather go to another site, so i have reprogrammed the whole client in awt apart from the textpane. I now face the problem of creating a canvas that supports styled text, images, word wrap and url posting.
I am only a beginner in java and the initial client was quite easy to do using swing, but to program an efficient canvas that supports this has proved to be quite challenging. would anyone beable to show me the best way of doing this? or refer me onto a library that already supports this? or is there even an awt version of the JTextPane somewhere which would save alot of time? any help would be most appreciated.
Thanks

I've seen a few APIs that are 100% pure java in 1.1 that implement a styled text area. They aren't free though and I'm pretty sure someone made some money off of the fact that java 1.1 didn't implement a styled text area.
I understand the problem you are having. Before the days of swing styled text was something you wished you had. Just so you know, there is no easy way of doing this. You could always paint it yourself with a canvas in a scroll pane but then you get to the point where, unless you did some serious mouse handling, highlighting text becomes very difficult.

Similar Messages

  • Text tool is only letting me type in white, black, and grey. How can I have it type in color? [was: Text]

    The text on my photoshop is only letting me type in white, black, and grey. How can I have it type in color? I have tried to change the color but no matter what I do it leaves the text in grey/

    What is the image mode?  Image > Mode - should be set to RGB
    Do you have a B&W adjustment layer above the Type layer?
    If you are not sure, it would help if you upload a screen grab of your entire workspace with the Layers and History panels visible.  Keep it at full resolution please.

  • Is it possible to show/hide a result text field only if another Text field is visible and has content?

    Hi
    Please could someone tell me if it is possible to make a text field visible only if another text field is visible and has content?
    I have this which works for the content part, but sometimes the field is hidden, so the script must not apply.
    var v1 = getField("Text1").value;
    event.target.display = v1 !== ""  ?
    display.visible : display.hidden;
    What I need is something along the lines of:
    var v1 = getField("Text1").value;
    event.target.display = (v1 !== "" && v1!=="Hidden") ?
    display.visible : display.hidden;
    Thanks for any advise.

    Thanks for the hints which led me to the right solution. I created a query to check if the trigger for the visibility was there or not, and this works. The script I have used is:
    var v1 = getField("Text1").value;
    var v2 = getField("Checkbox").value;
    var v3 = getField("Text2").value;
    event.target.display = (v1=="" || v3=="" && v2=="On" ) ?
    display.visible : display.hidden;

  • I'm running10.8.5. I have tried to install a programme but can't because it is from an unidentified developer. the box says-Your security preferences allow installation of only apps from the Mac App Store and identified developers.how do i install the pro

    i'm running10.8.5. I have tried to install a programme but can't because it is from an unidentified developer. the box says-Your security preferences allow installation of only apps from the Mac App Store and identified developers.how do i install the programme

    macjack gave you the easiest solution. Need to have admin privilieges to change this option.

  • Each time I type an apostrophe on pages it comes out as a divide sign and alters any preceding italicised text into meaningless letters and numbers. How do I change this?

    Each time I type an apostrophe on pages it comes out as a divide sign and alters any preceding italicised text into meaningless letters and numbers. How do I change this?

    Does this still happen if you set your font to Lucida Grande?
    Could you use the camera icon here to post a screen shot of how this looks with the meaningless letters and numbers?

  • I can not get any updates and therefor not use Java as it only run updates for Mac 10.7. and later? How do i get the updates to install and use Java?

    I can not get ny updates and therefore not use Java, as it only run updates for MAC 10.7. and later. How do i get the updates to install and use JAVA ?

    In Snow Leopard you update Java from Software Update (in the Apple menu). You can check your version by opening Terminal and typing
    java -version
    (don't get creative and type anything else)
    The latest version is 1.6.0_65.

  • Styled document with word wrap

    Hi,
    I need a text component which I can style the text and have word wrapping. I am currently using JEditorPane and HTML to do necessary styling but there is no word wrapping. JTextArea does word wrapping but no styling.
    any ideas?
    thanks.

    do you have a solution? I gave you a hint to the solution. You guessed what the answer was. I don't understand what problem you are having.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • I can't copy and paste text from Word to a Facebook Post since I've been using Firefox. Why am I getting the background code? Internet Explorer lets me copy text from Word to Facebook.

    I type my text in Word then open Facebook. I press Control-C to copy this text into my Facebook post and the result is that a lot of background code shows up.

    I would use the older version so you can continue working while troubleshooting continues in CC2014, if you haven't uninstalled it yet (and it didn't also lose the ability to copy/paste).
    Have you tried any of the usual suspects?
    Clear program cache and/or rename config folder: Deleting a corrupted cache file
    Restore Preferences: Restore preferences | Dreamweaver CS4, CS5, CS5.5, CS6

  • When we increase font size image also increase and becomes blurred, how to solve this?

    When we increase font size then image also become large and that's why they becomes blurred, there should be a way to increase only font size not image or symbols, so that they will clear.
    I think in safari i saw this feature.

    hello pandeyvinod.india, press alt in order to show the menu bar and go to ''view > zoom'' where you can select to only zoom text.

  • Image zooms in and bounces. How do I fade out?

    Getting my feet wet and trying a routine event. Have an image
    zooming in and bouncing. That works. What I want to do is fade the
    image out after it has stopped bouncing. How do I fade it out? Here
    is what I have:

    I came up with the below bit of code. But now the image fades
    and then re-appears

  • Styled text+Image in JTable

    Hi all java guru...
    I have a JTable and i would like to add dynamically in any cell styledText (e.g. bold,underline,italics,etc) and image with the features to align styledText on left/right of the image.
    I think that i must use CustomTableModel to maintain styledText information and some CustomTableCellRenderer clas that handles my cells. Is this correct? If somebody have already had this problem please can help me? Or drive me in some example that can help me.
    Can i realize it using DefaultTableModel only ??
    Thanks in advance.
    Cheers.

    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class Test extends JFrame {
      public Test() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        String[] head = {"One","Two","Three"};
        Font font1 = new Font("TimesRoman", Font.BOLD, 14);
        Font font2 = new Font("SansSerif", Font.ITALIC, 12);
        Font font3 = new Font("Tehoma", Font.PLAIN, 16);
        MyObject[][] data = {{new MyObject("Hello", font1),
            new MyObject("There", font2),new MyObject("anti-shock", font3)}};
        JTable jt = new JTable(data,head);
        jt.setDefaultRenderer(Object.class, new MyRenderer());
        content.add(new JScrollPane(jt), BorderLayout.CENTER);
        setSize(300, 300);
        setVisible(true);
      public static void main(String[] args) { new Test(); }
    class MyObject {
      String str;  Font font;
      public MyObject (String s, Font f) { str=s; font=f; }
      public String toString() { return str; }
      public Font getFont() { return font; }
    class MyRenderer extends DefaultTableCellRenderer {
      Font defaultFont = new Font( "Dialog" , Font.PLAIN, 12);
      public Component getTableCellRendererComponent(JTable table, Object value,
                                                     boolean isSelected,
                                                     boolean hasFocus,
                                                     int row, int column) {
        Component c = super.getTableCellRendererComponent(table,value,
            isSelected,hasFocus,row,column);
        if (value instanceof MyObject) c.setFont(((MyObject)value).getFont());
        else c.setFont(defaultFont);
        return c;
    }

  • Keep italics while styling text from Word

    I have a long book with loads of endnotes. I've gotten them to come in with italics preserved. However, I still need to reset the styles for them. But any change kills all italics. Is there a way to re-style the text in general and preserve the existing italics? There are hundreds of these, so going back to touch every one is an evil undertaking.

    Will do. In this case, I just needed to maintain italicized titles within endnotes. All of the endnotes are being stripped from their sections of this book and compiled in their own section in the back. So, once I bring in the content, I'm free to move them around. The issue has always been that my client never quite follows the style rules they are given to make the process flow easier. They overlap styles, apply random fonts, etc which I have not been able to get InDesign to suck in and map correctly. So, while the endnote style I mapped is applied to all of them, they still have a bogus Times Roman font applied on top. When I option + click my style, it kills off the italics in the reference titles. Same happens for the endnote reference numbers sometimes.
    But, you're Find + Replace steps worked perfectly. I now know a little bit more about Find + Replace strategy. If I did more pubs of this sort, I would surely like to find ways to cut off all this issues at the pass. This pub occurs biennially so, the pain and proposed solutions fade between hits. All of the data in the pub, we have split out in Excel, which works great–tables, charts, graphs etc.
    This is number 4. If the fifth one is on the table in 2012, or any others that may occur, do you have any recommended reading that covers a solid process for handling 200+ pages of endnoted content from Word...besides relying on clients to actually follow the instruction provided to them?

  • Importing Styled Text from Word

    For a publication, writers submit stories in Word format, with the Normal paragraph style set to Times New Roman. Within the paragraphs are numerous instances of Italic and Bold.
    My InDesign file has the Normal style set to ITC Garamond Light. When importing, the ID style definition for normal replaces that of Word, and the Times New Roman Bold comes in as ITC Garamond Bold. But the TNR Italic produces the Missing Fonts warning, because, of course, there is no ITC Garamond Italic. My solution has been to then run Find Font to replace the one Italic with the other.
    But I've been wondering if there might be a more seamless way to replace the font automatically?

    When you are importing the text, click "show import options" then click "Customize Style import" and then press "style mapping". A dialog box will come up that let's you map the Word style to your ID style. If there is a style in the list that isn't in your ID file, you can go backwards, and create that style the way you want it. Then, go back to theh import options and map theh styles accordingly.

  • Comments section in yahoo doesn't word wrap properly when posting a comment

    This is a very annoying problem that has been repeatable in FF 5
    You try to post a comment in Yahoo and characters disappear on the right side and they DO show up when you actually post the comment.
    WordWrap is not properly working. If you force a CR, the characters appear.

    I'm not sure why the resolution would affect the resizer; is it a Windows 7 feature?
    You can use a script to resize the box down to a width of 480px. Can you try this the next time the box isn't working? Just paste this to the address bar and press Enter:
    <br>javascript:void(document.getElementById("ugccmt-post-frm-textarea").style.width="480px");
    If you display the bookmarks toolbar, you can create a button to run that script. Copy the script, right-click the bar and choose New Bookmark, then paste the code in where it says Location and assign a short name such as Y-box.
    If you want an earlier version, 3.6.18 is up-to-date with security fixes. 3.5 is obsolete now.

  • When importing text into a slide and it overflows how do you see what is not on the screen

    When using keynote and importing text that overflows the slide how do you see the text not on the slide so that you can cut and paste to next slide

    Reduce the canvas to a smaller size:

Maybe you are looking for