Pegando duas ou mais linhas de um JTextPane e mostrando em outro campo

Olá amigos, estou cm uma duvida em um projeto que estou fazendo, alias uma não algumas duvidas, mas queria sanar uma em principal.
Estou com um projeto em Java de um edito de texto para tradução de jogos.
O que eu preciso é pegar o valor de um JTextPane e mostrar em um campo, nesse qual eu deixei como JTextField
Exemplo;


Nota-se 3 linhas porém só me é necessário as duas ultimas.
Como eu posso fazer para essas linhas aparecerem no campo de prévia.
Eu defini o campo para mostrar 30 carácter por linhas quando chegar no carácter [B] ele quebra linha.
Eu tentei usar o evento mouseCliked mas não deu certo, ou eu que não soube fazer direito.
Não sei se expliquei direito sou iniciante em Java, e ainda não tenho as manhas desses paranauês.

Você pode usar String.split para quebrar as linhas e String.replace para substituir a String que representa quebra de linha:

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextPane;
import javax.swing.border.EmptyBorder;

public class Tokenizer extends JFrame {
	
	private static final String REGEX_FIM_DE_LINHA = "\\r?\\n";
	private static final int PRIMEIRA_LINHA_DE_TEXTO = 1;
	
	private JPanel contentPane;
	private JTextArea textArea;

	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Tokenizer frame = new Tokenizer();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Tokenizer() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		JPanel panel = new JPanel();
		contentPane.add(panel, BorderLayout.CENTER);
		panel.setLayout(null);
		
		JTextPane textPane = new JTextPane();
		textPane.setBounds(10, 11, 210, 229);
		panel.add(textPane);
		
		textPane.setText("[123][321][42]\n"
				+ "Eu deveria saber![B]\n"
				+ "Mas não sabia!");
		
		textArea = new JTextArea();
		textArea.setBounds(230, 11, 184, 229);
		panel.add(textArea);
		
		textArea.setText(extrairTexto(textPane.getText()));
	}

	private String extrairTexto(String texto) {
		StringBuilder textoExtraido = new StringBuilder();
		String linhas[] = texto.split(REGEX_FIM_DE_LINHA);
		
		for(int i = PRIMEIRA_LINHA_DE_TEXTO; i < linhas.length; i++){
			textoExtraido.append(substituirQuebraDeLinha(linhas[i]));
		}
		return textoExtraido.toString();
	}

	private String substituirQuebraDeLinha(String linha) {
		return linha.replace("[B]", "\n");
	}
}

Abcs!

Muito obrigado hlucas, irei estudar, e praticar, muito obrigado mesmo.
Depois eu posto o resultado de como ficou.

Abs.

hlucas

Desculpe consegui executar o seu código mas não consegui usa-lo no meu JFrame, talvez com o código`em mãos possa ser melhor para analisar.

package gestaoarquivos;

import java.io.;
import javax.swing.
;

/**
*

  • @author ox-carnage
    */

public class JFGestaoA extends javax.swing.JFrame {

JFileChooser selecionado = new JFileChooser();
File arquivo;
byte[] bytesImg;
GestaoA editor = new GestaoA();
                
            
/**
 * Creates new form JFGestaoA
 */

public JFGestaoA() {
    initComponents();
}

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">                          
private void initComponents() {

    jSplitPane1 = new javax.swing.JSplitPane();
    btnAbrirArquivos = new javax.swing.JButton();
    jInternalFrame1 = new javax.swing.JInternalFrame();
    jScrollPane1 = new javax.swing.JScrollPane();
    txtAreaTexto = new javax.swing.JTextPane();
    lblImagem = new javax.swing.JLabel();
    btnGuardarImagem = new javax.swing.JButton();
    btnGuardarTexto = new javax.swing.JButton();
    jPanel3 = new javax.swing.JPanel();
    jTextField1 = new javax.swing.JTextField();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jMenu2 = new javax.swing.JMenu();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    btnAbrirArquivos.setText("Carregar Arquivo");
    btnAbrirArquivos.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnAbrirArquivosActionPerformed(evt);
        }
    });

    jInternalFrame1.setTitle("Arquivo traduzido");
    jInternalFrame1.setVisible(true);

    jScrollPane1.setViewportView(txtAreaTexto);

    javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout(jInternalFrame1.getContentPane());
    jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);
    jInternalFrame1Layout.setHorizontalGroup(
        jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jInternalFrame1Layout.createSequentialGroup()
            .addComponent(lblImagem)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE))
    );
    jInternalFrame1Layout.setVerticalGroup(
        jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jInternalFrame1Layout.createSequentialGroup()
            .addGap(144, 144, 144)
            .addComponent(lblImagem)
            .addGap(0, 421, Short.MAX_VALUE))
        .addGroup(jInternalFrame1Layout.createSequentialGroup()
            .addComponent(jScrollPane1)
            .addContainerGap())
    );

    btnGuardarImagem.setText("Salvar");
    btnGuardarImagem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnGuardarImagemActionPerformed(evt);
        }
    });

    btnGuardarTexto.setText("Salvar Texto");
    btnGuardarTexto.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnGuardarTextoActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
        jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE)
    );
    jPanel3Layout.setVerticalGroup(
        jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
    );

    jMenu1.setText("File");
    jMenuBar1.add(jMenu1);

    jMenu2.setText("Edit");
    jMenuBar1.add(jMenu2);

    setJMenuBar(jMenuBar1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(btnAbrirArquivos)
                    .addGap(28, 28, 28)
                    .addComponent(btnGuardarImagem)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(btnGuardarTexto))
                .addGroup(layout.createSequentialGroup()
                    .addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(42, 42, 42)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addContainerGap(36, Short.MAX_VALUE))
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18))
                .addGroup(layout.createSequentialGroup()
                    .addGap(60, 60, 60)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(btnAbrirArquivos)
                .addComponent(btnGuardarImagem)
                .addComponent(btnGuardarTexto))
            .addGap(290, 290, 290))
    );

    pack();
}// </editor-fold>                        

//Função para abrir um arquivo de texto ou de imagem
private void btnAbrirArquivosActionPerformed(java.awt.event.ActionEvent evt) {                                                 
    if (selecionado.showDialog(null, "Abrir arquivo") == JFileChooser.APPROVE_OPTION){
        arquivo = selecionado.getSelectedFile();
        if (arquivo.canRead()){
            if (arquivo.getName().endsWith("txt")){
                String conteudo = editor.AbrirATexto(arquivo);
                txtAreaTexto.setText(conteudo);
            }else{
                if (arquivo.getName().endsWith ("jpg")||arquivo.getName().endsWith("png")|| arquivo.getName().endsWith("gif")){
                bytesImg = editor.AbrirAImagem(arquivo);
                lblImagem.setIcon(new ImageIcon(bytesImg));
                            
                }else{
                    JOptionPane.showMessageDialog(null, "Por favor selecione um arquivo de texto");
                }
                        
                }           
            }
        }
}                                                

//Função para salvar um arquivo de imagem, usado caso necessario
private void btnGuardarImagemActionPerformed(java.awt.event.ActionEvent evt) {                                                 
    
    if (selecionado.showDialog(null, "Salvar Imagem") == JFileChooser.APPROVE_OPTION){
        arquivo = selecionado.getSelectedFile();
        if (arquivo.getName().endsWith("jpg") || arquivo.getName().endsWith("png") || arquivo.getName().endsWith("gif")){
            String resposta = editor.SalavarAImagem(arquivo, bytesImg);
            if (resposta!=null){
                JOptionPane.showMessageDialog(null, resposta);
            }else{
                JOptionPane.showMessageDialog(null, "Erro ao salvar imagem");
            }
        }else{
               JOptionPane.showMessageDialog(null, "A imagem deve ser salvo em formato de imagem");
        }
        }
}                                                

// Função para salvar os textos editado:
private void btnGuardarTextoActionPerformed(java.awt.event.ActionEvent evt) {                                                
    
     if (selecionado.showDialog(null, "Salvar Texto") == JFileChooser.APPROVE_OPTION){
        arquivo = selecionado.getSelectedFile();
        if (arquivo.getName().endsWith("txt")){
            String conteudo = txtAreaTexto.getText();
            String resposta = editor.SalvarATexto(arquivo, conteudo);
            if (resposta!=null){
                JOptionPane.showMessageDialog(null, resposta);
            }else{
                JOptionPane.showMessageDialog(null, "Erro ao salvar arquivo");
            }
        }else{
               JOptionPane.showMessageDialog(null, "O arquivo deve ser salvo em formato de texto");

        }
}                                               


/**
 * @param args the command line arguments
 */

    /* Create and display the form */
    java.awt.EventQueue.invokeLater(new Runnable() {
        public void run() {
            new JFGestaoA().setVisible(true);
        }
    });
}

// Variables declaration - do not modify                     
private javax.swing.JButton btnAbrirArquivos;
private javax.swing.JButton btnGuardarImagem;
private javax.swing.JButton btnGuardarTexto;
private javax.swing.JInternalFrame jInternalFrame1;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JPanel jPanel3;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JSplitPane jSplitPane1;
private javax.swing.JTextField jTextField1;
private javax.swing.JLabel lblImagem;
private javax.swing.JTextPane txtAreaTexto;
// End of variables declaration                   

}