You need to set the tab component yourself; which governs how the tab title is rendered.
// Create tabbed pane and add tabs.
JTabbedPane tabbedPane = ...
// Create bespoke component for rendering the tab.
JLabel lbl = new JLabel("Hello, World");
Icon icon = new ImageIcon(getClass().getResource("/foo/bar/hello.jpg"));
lbl.setIcon(icon);
// Add some spacing between text and icon, and position text to the RHS.
lbl.setIconTextGap(5);
lbl.setHorizontalTextPosition(SwingConstants.RIGHT);
// Assign bespoke tab component for first tab.
tabbedPane.setTabComponentAt(0, lbl);
Obviously you could encapsulate this in a utility method:
private void addTab(JTabbedPane tabbedPane, Component tab, String title, Icon icon) {
tabbedPane.add(tab);
JLabel lbl = ... // Create bespoke label for rendering tab title.
tabbedPane.setTabComponentAt(tabbedPane.getTabCount() - 1, lbl);
}