Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

Chủ đề này đã đóng và được lưu lại. Vui lòng hỏi một câu hỏi mới nếu bạn cần giúp đỡ.

With recent version of mac FireFox 24 and above, the java awt component Canvas is not getting visible in browser secreen. This issue occurs only with Mac env

  • 1 trả lời
  • 2 gặp vấn đề này
  • 5 lượt xem
  • Trả lời mới nhất được viết bởi the-edmeister

more options

Java awt Canvas Image is not getting displayed with Mac FireFox 24 and above. The same Canvas image is getting displayed properly with Windows FireFox. Please find the code snippet below.

Is this an issue with FireFox or any extra steps needed in Mac to make this working ?

public class CanvasSample extends Applet

{

  public void init() {
   this.add(new RedOval());
 }

}

class RedOval extends Canvas {

 public void paint(Graphics g) {
   Dimension d = this.getSize();
   g.setColor(Color.red); 
   g.fillOval(0, 0, d.width, d.height);
 }
 public Dimension getMinimumSize() {
   return new Dimension(50, 100);
 }
 public Dimension getPreferredSize() {
   return new Dimension(150, 300);
 }
 public Dimension getMaximumSize() {
   return new Dimension(200, 400);
 }

}

Java awt Canvas Image is not getting displayed with Mac FireFox 24 and above. The same Canvas image is getting displayed properly with Windows FireFox. Please find the code snippet below. Is this an issue with FireFox or any extra steps needed in Mac to make this working ? public class CanvasSample extends Applet { public void init() { this.add(new RedOval()); } } class RedOval extends Canvas { public void paint(Graphics g) { Dimension d = this.getSize(); g.setColor(Color.red); g.fillOval(0, 0, d.width, d.height); } public Dimension getMinimumSize() { return new Dimension(50, 100); } public Dimension getPreferredSize() { return new Dimension(150, 300); } public Dimension getMaximumSize() { return new Dimension(200, 400); } }

Tất cả các câu trả lời (1)

more options