paint

    0熱度

    2回答

    我試圖自定義繪製DataGridView,但我很難讓它看起來正確後DataGridView滾動。有些線條顯示在我的單元格中。問題在於滾動控件時,繪畫事件似乎不會重繪單元格,因此在窗體邊緣繪製的單元格在滾動到中心時不會重新繪製。 我可以通過忽略這樣一個事實來消除這個問題:DataGridView邊緣的一部分單元格不顯示,並將它們繪製爲完全可見,但這會使我的應用程序看起來不太好。 我的問題是:有沒有更

    5熱度

    1回答

    我想畫一個SpannedString爲Canvas。 SpannableString spannableString = new SpannableString("Hello World!"); ForegroundColorSpan foregroundSpan = new ForegroundColorSpan(Color.RED); BackgroundColorSpan backgro

    0熱度

    1回答

    繼承我的代碼,用手指畫線繪製圓。我想知道如何查找線條的長度,並想要繪製具有半徑線長度的圓。 我該怎麼做? 和在哪裏,就把這行? circlePath.addCircle(mX, mY, "line's length", Path.Direction.CW); public class MainActivity extends Activity { /** Called when the

    0熱度

    1回答

    我在想我是否能夠在JFrame以外的東西上使用Java的圖形類的paint方法 - 也就是說,不允許JFrames。可能嗎? 提前致謝!

    0熱度

    1回答

    讓我首先說我找到了以下內容,但沒有一個解決方案適用於我。 Cells gets overlapped and painted when Scroll happens in DataGridView DataGridView overrides my custom row painting DataGridView CellPainting Not Fully Working on Scroll 在

    3熱度

    1回答

    我看了一篇教程並試圖做同樣的事情,我編寫的代碼完全一樣,但沒有顯示任何內容。我認爲這是因爲paintComponent方法沒有被調用,我也嘗試通過paintComponent打印某些內容到控制檯。 這裏是我的代碼: public class Line extends JPanel{ @Override public void paintComponents(Graphics

    0熱度

    1回答

    我以爲我在這個程序中添加了我的主代碼,但它沒有識別。我錯過了嗎?我得到錯誤paint.Paintbrush類沒有在PaintBrush項目中找到。我不確定在哪裏可以包含主類,而不會返回錯誤。感謝您提供任何建議或幫助。 package PaintBrush; import java.applet.Applet; import java.awt.BorderLayout; import jav

    0熱度

    1回答

    圖片: Click to see image 我能得到其他形狀,以正確地畫同樣的方式,但由於某些原因,當我把最後的形狀的第二個角低於形狀的第四個角落,會發生此錯誤(奇怪顏色的奇怪矩形)。 座標都很好,但在這裏你走了。 (W =屏幕最大寬度,H =屏幕最大高度) paint.setARGB(50, 0, 0, 0); paint.setStyle(Paint.Style.FILL); paint

    0熱度

    1回答

    我有一個JPanel和JButton類。點擊按鈕時,我想在我的JPanel中顯示圖形。圖形是在不同的類。有人可以幫我做這個嗎? GUI類: public class Gui extends JFrame implements ActionListener{ JButton showGraph; public Gui() { super("GUI");

    1熱度

    1回答

    與CScrollWindowImpl void Scroll::DoPaint(CDCHandle hDC) { if (_MemDC==NULL) return; RECT r; //I'd like to update r with rcPaint from the DC's PAINTSTRUCT here hDC.BitBl