У меня возникли проблемы с отображением календаря Google в java jframe.
Отредактировано: я вижу календарь Google, но он имеет синий фон, что затрудняет просмотр событий.
Вот фрагмент моего кода
temp
— это имя пользователя Google.
private void getGoogleCalendar(){
googlepane=new JPanel(new BorderLayout());
String s="https://www.google.com/calendar/b/0/[email protected]&ctz=America/New_York&gsessionid=OK";
JEditorPane tp=new JEditorPane();
try {
HTMLEditorKit kit = new HTMLEditorKit();
StyleSheet styles =kit.getStyleSheet();
styles.importStyleSheet(new URL(s));
kit.setStyleSheet(styles);
kit.install(tp);
tp.setContentType("text/html");
tp.setEditorKit(kit);
tp.addHyperlinkListener(this);
tp.setEditable(false);
tp.setPage(s);
tp.setBackground(Color.white);
} catch (IOException e) {
e.printStackTrace();
}
googlepane.add(tp, BorderLayout.CENTER);
return;
}