The simplest way (I would do it) would be to use Vertical BoxLayouton JPanel. Each tweet will then be its own JPanel( TweetPanel extends JPanel) s BorderLayout, where the image is in WEST and the tweet text is in the CENTER.
Below is a description of how I was going to lay out one of the panels of the restaurant.
public ResturantPanel extends JPanel {
public ResturantPanel(String name, String address, List<String> reviews, Icon icon){
setLayout(new BorderLayout());
JLabel iconLabel = new JLabel(theIcon);
JLabel nameLabel = new JLabel(name);
JLabel addressLabel = new JLabel(address);
JPanel southReviewPanel = new JPanel();
southReviewPanel.setLayout(new BoxLayout(southReviewPanel, BoxLayout.Y_AXIS);
for (String review: reviews) {
southReviewPanel.add(new JTextArea(review));
}
add(southReviewPanel);
add(iconLabel, BorderLayout.West);
JPanel northPane = new JPanel();
northPane.setLayout(new BoxLayout(northPane, BoxLayout.Y_AXIS));
northPane.add(nameLabel);
northPane.add(addressLabel);
add(northPane, BorderLayout.North);
}
}
, . . , , , southReviewPanel, southReviewPanel, , , .
JPanel JScrollPane, .