When the calendar is viewed in a jframe jeditorpanel the background is blue and not white.
在jframe jeditorpanel中查看日历时,背景为蓝色而不是白色。
Here is my code:
这是我的代码:
import java.io.IOException;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
public class ShowHTMLDocument {
public static void main(String[] args) throws IOException {
JFrame f = new JFrame("Google Calendar");
final JEditorPane ep = new JEditorPane("https://www.google.com/calendar/htmlembed?src=groupboba@gmail.com&ctz=America/New_York&gsessionid=OK");
ep.setContentType("text/html");
ep.setEditable(false);
f.getContentPane().add(new JScrollPane(ep));
f.setSize(400, 300);
f.setVisible(true);
}
}
If you run this you will see the blue back ground, but if you go to the link in a browser, then it has a white background.
如果你运行它,你会看到蓝色背景,但如果你在浏览器中转到链接,它有一个白色背景。
1 个解决方案
#1
0
It seems java jeditor doesn't like CSS, so i gave up :(
看来java jeditor不喜欢CSS,所以我放弃了:(
#1
0
It seems java jeditor doesn't like CSS, so i gave up :(
看来java jeditor不喜欢CSS,所以我放弃了:(