Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Knute Johnson Newsgroups: comp.lang.java.programmer Subject: Graphics2D#fill3DRect? Date: Sun, 31 Mar 2019 16:11:02 -0500 Organization: A noiseless patient Spider Lines: 39 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 31 Mar 2019 21:11:04 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="0cfb5649e2ebefd2e7b814a46fb85d64"; logging-data="7420"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19MipOBOHZCNwCMieSZ3dFv" User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Cancel-Lock: sha1:TBBVd+Uaw5GqnPoJgGBK9JwjYpw= Content-Language: en-US X-Mozilla-News-Host: snews://eternal-september:563 Xref: csiph.com comp.lang.java.programmer:38840 I don't see any 3D effect. Running on Windows 8 with OpenJDK 11.0.2. Screen capture of window at http://knutejohnson.com/test.png. I tried it with the Graphics#fill3DRect too and got the same results. Anybody see anything different? Thanks! import java.awt.*; import java.awt.event.*; import javax.swing.*; public class test extends JPanel { public test() { setPreferredSize(new Dimension(640,480)); } public void paintComponent(Graphics g2D) { Graphics2D g = (Graphics2D)g2D; Rectangle b = getBounds(null); g.setColor(Color.WHITE); g.fill(b); g.setColor(Color.BLUE); g.fill3DRect(b.x+40,b.y+40,b.width-80,b.height-80,true); } public static void main(String... args) { EventQueue.invokeLater(() -> { JFrame f = new JFrame("test"); f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); f.add(new test(),BorderLayout.CENTER); f.pack(); f.setVisible(true); }); } }