harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4572) [classlib][swing][html] Tag <center> doesn't work
Date Tue, 07 Aug 2007 09:27:59 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518129
] 

Vasily Zakharov commented on HARMONY-4572:
------------------------------------------

I've checked, if default style sheet is replaced (with empty style sheet), <center>
tag stops functioning on RI also. So it seems RI uses the same way of specifying HTML attribute
behavior.

CSS is the standard for specifying elements behavior.
CSS is already supported by our Swing/HTML engine.
Our default CSS already specifies behavior for a number of elements, like <b>, <i>
and many others.
So I don't see any reason for us to reinvent this wheel.


> [classlib][swing][html] Tag <center> doesn't work
> -------------------------------------------------
>
>                 Key: HARMONY-4572
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4572
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Vasily Zakharov
>            Assignee: Alexey Petrenko
>         Attachments: Harmony-4572-Fix.patch, Harmony.jpg, RI.jpg
>
>
> HTML tag <center> is not handled properly. To reproduce, run the following test:
> import java.awt.event.*;
> import java.io.IOException;
> import javax.swing.*;
> public class Test {
>     public static void main(String[] args) {
>         try {
>             final JEditorPane editorPane = new JEditorPane("text/html",
>                     "<html><body><center>Test</center></body></html>");
>             editorPane.setEditable(false);
>             JFrame frame = new JFrame("Test");
>             frame.addWindowListener(new WindowAdapter() {
>                 public void windowClosing(WindowEvent event){
>                     System.exit(0);
>                 }
>             });
>             JPanel contentPane = (JPanel) frame.getContentPane();
>             contentPane.add(editorPane);
>             frame.setSize(400, 300);
>             frame.setVisible(true);
>         } catch (Throwable e) {
>             System.out.print("ERROR: ");
>             e.printStackTrace(System.out);
>         }
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message