Results 1 to 3 of 3

Thread: tabulate \t

  1. #1
    Peter is offline Senior Member
    Join Date
    Jun 2007
    Posts
    119
    Rep Power
    0

    Default tabulate \t

    It doesn't tabulate this: (\t) in the JOptionPane.showInputDialog, I donīt know why, I'm working with win32, it's very strange

    thanks

  2. #2
    Ed
    Ed is offline Senior Member
    Join Date
    Jun 2007
    Posts
    110
    Rep Power
    0

    Default

    Check this link
    How to Use HTML in Swing Components (The Java™ Tutorials > Creating a GUI with JFC/Swing > Using Swing Components)
    and I write an quickly example:
    Java Code:
    import javax.swing.*;
    public class Test {
    public static void main(String args[]) {
    String message =
    "<html><table>" +
    "<tr>" +
    "<td>uno</td>" +
    "<td>123</td>" +
    "</tr>" +
    "<tr>" +
    "<td>dos</td>" +
    "<td>456</td>" +
    "</tr>" +
    "</table></html>";
    
    Object[] options = { "OK", "CANCEL" };
    JOptionPane.showOptionDialog(null, message, "Warning",
    JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
    options, options[0]);
    }
    }

  3. #3
    bbq
    bbq is offline Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Rep Power
    0

    Default

    Did you try this? JOptionPane.showInputDialog("Beginning \t text tabulate\n text in a new line");

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •