I am having trouble displaying a google calendar in a java jframe.
Edited: I do see the google calendar, but it is has a blue background and it makes it difficult to view events.
Here is a snipit of my code
temp
is the google username.
private void getGoogleCalendar(){
googlepane=new JPanel(new BorderLayout());
String s="https://www.google.com/calendar/b/0/htmlembed?src=groupboba@gmail.com&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;
}