JPanel « JTextPane « Java Swing Q&A





1. JPanels and JTextPane in the..    coderanch.com

I'm having trouble deleting JPanels that are in my JTextPanes by using a method call (ie .remove(jPanel)), does this work or am I limited to only deleting through the del or backspace keys?? Also, I need to highlight an area and if a jlabel is within the selectionI need to be able to find out which label it is to perform ...

2. JTextPane/Custom JPanel problem    java-forums.org

@Override public void paintComponent(Graphics g){ this.w = getWidth(); this.h = getHeight(); this.arcw = getWidth()/wRatio; this.arch = getHeight()/hRatio; re = new RoundRectangle2D.Double(st.getLineWidth()/2,st.getLineWidth()/2,w-(st.getLineWidth()/0.5), h-(st.getLineWidth()/0.5), arcw, arch); GradientPaint up = new GradientPaint(w/2, h/2, Color.WHITE, w/2, h, Color.LIGHT_GRAY, false); Graphics2D g2 = (Graphics2D) g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON); g2.setPaint(up); g2.fill(re); //super.paintComponent(g); } @Override public void paintBorder(Graphics g){ Graphics2D g2 = (Graphics2D) g; g2.setColor(Color.GRAY); g2.setStroke(st); g2.draw(re); g2.dispose(); }

3. i need help with JPanel and JTextPane    forums.oracle.com

i have used an inner-class to implement this JPanel. and have created a new object for each record in the DB. now, my problem is, when i press any button for the first time to view its records, its record gets displayed without problem, but for each object after that, when i press the JButton to see another record nothing happens, ...