I'm creating a text editor as my exam work and I have a main JPanel
which all the Swing components are on. At the top I have a JMenuBar
and in the center a JTextPane
and at both sides I have panels that display images. The problem I have is that between the left side of the text pane and my right panel there is a weird line and I can't figure out how to get rid of it.
I have tried setBorderPainted
to false on both my text pane and panel but that didn't work. In the first image there is a weird line between the text pane right side and the rights sides panel but not to the left panel.
weird line between jtextpane and jpanel - image
The right side should look like the left side as shown in the second image.