You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vasily Zakharov (JIRA)" <ji...@apache.org> on 2007/07/31 01:16:53 UTC

[jira] Created: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

[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
         Attachments: Harmony.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.


[jira] Commented: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517910 ] 

Alexey Petrenko commented on HARMONY-4572:
------------------------------------------

The problem with this patch is that center tag should center the content with or without anderlying css.


> [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.


[jira] Updated: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov updated HARMONY-4572:
-------------------------------------

    Attachment: RI.jpg

Output on RI

> [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
>         Attachments: 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.


[jira] Commented: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517906 ] 

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

I don't think it's a workaround. I couldn't find anything making this decision wrong.

For example, see info on CENTER tag at the following links:
http://www.w3.org/TR/REC-CSS2/sample.html
http://www.w3.org/TR/html401/index/elements.html


> [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.


[jira] Commented: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521697 ] 

Alexey A. Ivanov commented on HARMONY-4572:
-------------------------------------------

Alexey,

I think Vasily is right here. <center> tag should center text by default but it should be easily overridden by user. Thus nothing stops you from adding
center {
    text-align: right;
}
to make text be aligned to the right edge. It doesn't contradict the spec; moreover <center> tag is deprecated.

So my opinion is we *should* adhere to using CSS to control visual presentation as much as possible.

> [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.


[jira] Commented: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517916 ] 

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

default.css is a part of our Swing implementation. It's always there.

Could you provide an example of a situation when this patch wouldn't provide the necessary behavior?


> [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.


[jira] Assigned: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko reassigned HARMONY-4572:
----------------------------------------

    Assignee: Alexey Petrenko

> [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.


[jira] Updated: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov updated HARMONY-4572:
-------------------------------------

    Attachment: Harmony-4572-Fix.patch

A simple patch to this issue is attached.

I've updated a javax/swing/text/html/default.css file to set "text-align" attribute to "center" for the <center> tag by default. It seems to resolve the problem.


> [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
>         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.


[jira] Commented: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518070 ] 

Alexey Petrenko commented on HARMONY-4572:
------------------------------------------

Vasily,

the default style sheet can be substituted by user one. And users are not required to add "text-align" attribute for center tag normally. So this patch will not work with modified css.

And why it seems to you that defining tag behaviour in css which can be changed at any moment is better way then define it's behaviour in Java?

> [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.


[jira] Updated: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov updated HARMONY-4572:
-------------------------------------

    Attachment: Harmony.jpg

Output on Harmony

> [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
>         Attachments: Harmony.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.


[jira] Updated: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko updated HARMONY-4572:
-------------------------------------

    Patch Info:   (was: [Patch Available])

I would say that this is a workaround and we need a better fix.
But this patch can be probably applied.

> [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.


[jira] Resolved: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko resolved HARMONY-4572.
--------------------------------------

    Resolution: Fixed

The patch has been applied.
Please verify.

> [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.


[jira] Updated: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov updated HARMONY-4572:
-------------------------------------

    Patch Info: [Patch Available]

> [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.


[jira] Commented: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517918 ] 

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

Moreover, it seems to me that using CSS to specify the tags behavior is right and effective way, and it's better than hardcoding it in Java.


> [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.


[jira] Updated: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov updated HARMONY-4572:
-------------------------------------

    Patch Info: [Patch Available]

> [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
>         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.


[jira] Closed: (HARMONY-4572) [classlib][swing][html] Tag
doesn't work

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov closed HARMONY-4572.
------------------------------------


I've created HARMONY-4662 to record the issue of using CSS to specify HTML tags behavior. It may be resolved later.

Closing this issue as fixed.


> [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.