Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public HtmlForm()
- {
- HTMLComponent htmlC = new HTMLComponent(null);
- setLayout(new BoxLayout(BoxLayout.Y_AXIS));
- StringBuffer sb = new StringBuffer();
- sb.append("<style type=\"text/css\">.category{color:#003063;margin-bottom:8px;}.items{color:#315984;margin-left:20px;margin-bottom:8px;font-size:small;}</style>");
- prepareHtml("category1", "super long string ....", sb);
- prepareHtml("category2", "super long string ....", sb);
- prepareHtml("test", "<a href=\"asdf\">test</a>", sb);
- htmlC.setBodyText(sb.toString());
- setScrollable(false); // The HTMLComponent itself will be scrollable, not the form
- setScrollableX(false); // The HTMLComponent itself will be scrollable, not the form
- addComponent(htmlC);
- }
- private void prepareHtml(String category, String items, StringBuffer sb)
- {
- sb.append("<div class=\"category\">");
- sb.append(category);
- sb.append("</div>");
- sb.append("<div class=\"items\">");
- sb.append(items);
- sb.append("</div>");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement