RE: [OpenMap Users] JSplitPane in OpenMap?

From: Mulone <andrea.ballatore_at_ucd.ie>
Date: Wed, 8 Jul 2009 20:09:26 -0700 (PDT)

Thanks Melvin, I tried to apply your solution but I get an empty grey
panel... Apparently I can't load a simple awt/swing component to the
maphandler. Maybe I have to define it as "implements BeanContextChild,
BeanContextMembershipListener". What do you think?

Thanks a million,
Mulone


Mulone,

You are definitely on the right track by adding the MapBean to your
JSplitPane. Chances are, the MapHandler object does not know what to do with
the JSplitPane though. Try adding it to a Container like a JFrame. See
Below.


JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setSize(1000, 800);
frame.setLayout(new BorderLayout());

//YOUR CODE HERE, ILL JUST CONTINUE WITH THE SPLIT PANE

JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, mapBean,
infoBr); frame.add(splitPane, BorderLayout.CENTER);

frame.setVisible(true);



I apologize the syntax may be off a little I just wrote this quickly to give
you an idea of what I was talking about. Chances are you may need to extract
the individual OpenMap components and add them to the container as well.
Good luck.

Derek Melvin



-- 
View this message in context: http://www.nabble.com/JSplitPane-in-OpenMap--tp24390845p24402981.html
Sent from the OpenMap mailing list archive at Nabble.com.
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Jul 08 2009 - 23:09:48 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT